Skip to content

Commit

Permalink
ci: Small adaptions to external contributor workflow (#12828)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mydea authored Jul 9, 2024
1 parent a5ea680 commit 0952ec4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/external-contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
contents: write
runs-on: ubuntu-20.04
if: |
github.event.pull_request.merged == true &&
github.event.pull_request.author_association != 'COLLABORATOR'
github.event.pull_request.merged == true
&& github.event.pull_request.author_association != 'COLLABORATOR'
&& github.event.pull_request.author_association != 'MEMBER'
&& github.event.pull_request.author_association != 'OWNER'
&& github.actor != 'dependabot[bot]'
Expand All @@ -34,6 +34,8 @@ jobs:
uses: ./dev-packages/external-contributor-gh-action
with:
name: ${{ github.event.pull_request.user.login }}
author_association: ${{ github.event.pull_request.author_association }}

- name: Create PR with changes
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
with:
Expand All @@ -42,5 +44,5 @@ jobs:
branch: 'external-contributor/patch-${{ github.event.pull_request.user.login }}'
base: 'develop'
delete-branch: true
body: This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution.
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 }}"

3 changes: 3 additions & 0 deletions dev-packages/external-contributor-gh-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
name:
required: true
description: 'The name of the external contributor'
author_association:
required: false
description: 'The association of the author'
runs:
using: 'node20'
main: 'index.mjs'

0 comments on commit 0952ec4

Please sign in to comment.