Skip to content

ci: Add workflow to automatically add external contributors to CHANGELOG.md #12428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jun 13, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Jun 10, 2024

This adds a new GHA job that, if a PR is created by an external contributor, it will open a PR against that branch that adds the contributor to the changelog, so we do not forget about this.

It will open a PR like this:

#12435

which we have to manually merge/review, so nothing "bad" can happen.

@mydea mydea self-assigned this Jun 10, 2024
@mydea mydea force-pushed the fn/add-external-contributor branch 3 times, most recently from 2934ab3 to e0b32ad Compare June 10, 2024 12:35
@mydea mydea force-pushed the fn/add-external-contributor branch 2 times, most recently from 666087e to 7f4a720 Compare June 10, 2024 13:57
runs-on: ubuntu-20.04
if: |
github.event_name == 'pull_request'
&& (github.action == 'opened' || github.action == 'reopened')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not run this on each update, as it is kind of wasteful (it should not actually error, just unnecessary computation)

@mydea mydea marked this pull request as ready for review June 10, 2024 14:04
@mydea mydea changed the title ci: Add workflow to automatically propose external contributors in CHANGELOG.md ci: Add workflow to automatically add external contributors to CHANGELOG.md Jun 10, 2024
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the example PR, shouldn't the workflow have appended the new contributor to the already mentioned one? We could also just keep a list of contributors in the ##Unreleased section to simplify the appending process

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regardless, I'm fine with either way, as long as we don't by default overwrite already mentioned contributors 😅

@mydea
Copy link
Member Author

mydea commented Jun 10, 2024

Looking at the example PR, shouldn't the workflow have appended the new contributor to the already mentioned one? We could also just keep a list of contributors in the ##Unreleased section to simplify the appending process

It should! I forced it to only add a single entry to test how it looks (I manually removed it in the changelog)

@mydea
Copy link
Member Author

mydea commented Jun 10, 2024

We could also just keep a list of contributors in the ##Unreleased section to simplify the appending process

I added some logic to handle this, hopefully. It's regex-y, but I tested the different scenarios and it should work to append stuff correctly if it exsits!

@mydea mydea merged commit 60dad34 into develop Jun 13, 2024
111 checks passed
@mydea mydea deleted the fn/add-external-contributor branch June 13, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants