-
Notifications
You must be signed in to change notification settings - Fork 963
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
fix(ci): improve attribution of co-authors #4104
fix(ci): improve attribution of co-authors #4104
Conversation
Co-authored-by
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you and sorry again that this didn't work properly.
As mentioned in the other PR I am in contact with GitHub support about this.
I was bothered with the empty lines too, although so far I considered it to be purely cosmetic. I did open a discussion upstream already but hadn't had the time yet to try it out: Mergifyio/mergify#5091 I used https://j2live.ttl255.com/ in the past to test out the template rendering without having to iterate by merging PRs. The |
Co-authored-by
Argh, I forgot that mergify doesn't support updating variables within a loop. |
Yey! I think I managed to get this to work! |
Unfortunately, the automated contribution message does not work properly. To evaluate this correctly, we need to first filter out all merge commits. To do this, we need to check the length of the `parents` property. I did not find a way to do this with jinja2 filters. Which would allow us to do something like `rejectattr`. In the code snippet removed in this PR, I attempted to create a property to filter the merge commits on. This also doesn't work because the underlying object exposed by mergify is not a dictionary but a class and thus does not have the `update` function. Mergify is shipping an additional property next month: Mergifyio/mergify#4636 (reply in thread). Thus, I am replacing this automated mechanism with a manual section that we can add to the PR until mergify ships the additional property that we can utilize to implement this in a clean way. Related: #4130. Related: #4104. Pull-Request: #4131.
Description
Fix the
Co-authored-by
inclusion in commit messages so that co-authorship is properly expressed. Additionally, filter merge commits before unique authors. Previously, we would not attribute an author if their first commit in a PR was a merge commit. Finally, we remove superfluous newlines between theCo-authored-by
lines.Notes & open questions
Change checklist