Skip to content

Commit 0952ec4

Browse files
authored
ci: Small adaptions to external contributor workflow (#12828)
This does two things: 1. Pass the author association to the step - we do not use it right now, but it will be logged at least, allowing us to debug this. 2. Include a reference to the merged PR in the PR body.
1 parent a5ea680 commit 0952ec4

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/external-contributors.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
contents: write
1515
runs-on: ubuntu-20.04
1616
if: |
17-
github.event.pull_request.merged == true &&
18-
github.event.pull_request.author_association != 'COLLABORATOR'
17+
github.event.pull_request.merged == true
18+
&& github.event.pull_request.author_association != 'COLLABORATOR'
1919
&& github.event.pull_request.author_association != 'MEMBER'
2020
&& github.event.pull_request.author_association != 'OWNER'
2121
&& github.actor != 'dependabot[bot]'
@@ -34,6 +34,8 @@ jobs:
3434
uses: ./dev-packages/external-contributor-gh-action
3535
with:
3636
name: ${{ github.event.pull_request.user.login }}
37+
author_association: ${{ github.event.pull_request.author_association }}
38+
3739
- name: Create PR with changes
3840
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
3941
with:
@@ -42,5 +44,5 @@ jobs:
4244
branch: 'external-contributor/patch-${{ github.event.pull_request.user.login }}'
4345
base: 'develop'
4446
delete-branch: true
45-
body: This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution.
47+
body: "This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #${{ github.event.pull_request.number }}"
4648

dev-packages/external-contributor-gh-action/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inputs:
44
name:
55
required: true
66
description: 'The name of the external contributor'
7+
author_association:
8+
required: false
9+
description: 'The association of the author'
710
runs:
811
using: 'node20'
912
main: 'index.mjs'

0 commit comments

Comments
 (0)