fix(ci): improve attribution of co-authors#4104
fix(ci): improve attribution of co-authors#4104thomaseizinger merged 4 commits intolibp2p:masterfrom
Conversation
Co-authored-by
thomaseizinger
left a comment
There was a problem hiding this comment.
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-byinclusion 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-bylines.Notes & open questions
Change checklist