-
Notifications
You must be signed in to change notification settings - Fork 22
feat: add support for Co-authored-by commit trailers with username correlation #373
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
|
@copilot instead of having ACKNOWLEDGE_COAUTHORS default to False, lets change it to defaulting to true. I think that users will want that to work out of the box. Make sure to update that in the code and documentation as well. |
Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
Changed default to True in commit 9798816. Updated:
|
|
@copilot instead of only allowing specific email domains for coauthors, please change the code and documentation to allow any email domain to be recognized as a coauthor. For example: right now john@example.com is not counted as a coauthor but id like that functionality changed so it is included. |
Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
Changed in commit 211543e. Now any email domain is recognized as a co-author:
|
|
Testing locally today |
|
Notes from testing:
|
|
@copilot Can you figure out how to make sure that the email specified as the co-author is correlated with its github username and added to the stats in the table for that user? |
…g contributors Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
Implemented in commit ee109e5. The solution:
This addresses all three issues from testing:
|
Pull Request
Proposed Changes
Adds support for recognizing
Co-authored-by:commit trailers to include co-authors as contributors. This addresses the request to acknowledge users who contribute via pair programming or collaborative commits.Changes
ACKNOWLEDGE_COAUTHORS(default:True) - enables co-author detection out of the boxget_coauthors_from_message()- parsesCo-authored-by:trailers from commit messages, supporting any email domainget_coauthor_contributors()- iterates commits to aggregate co-author contributions, builds email-to-username mapping, and merges contributions with existing contributorsget_contributors()andget_all_contributors()- integrates co-author detection when enabled, with explicit parameter passing (no default values in function signatures)How it works
The action now scans commit messages by default for
Co-authored-by:trailers and intelligently correlates co-author emails to GitHub usernames:Example commit message:
Key benefits:
This feature is enabled by default to provide out-of-the-box support for collaborative workflows.
The
acknowledge_coauthorsparameter is always explicitly passed from the environment configuration to avoid confusion about default precedence.Usage
The feature is enabled by default. To disable it:
Readiness Checklist
Author/Contributor
make lintand fix any issues that you have introducedmake testand ensure you have test coverage for the lines you are introducing@jeffrey-luszczReviewer
bug,documentation,enhancement,infrastructure,maintenanceorbreakingOriginal prompt
Co-authored-by:for this](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors). #372💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.