-
Notifications
You must be signed in to change notification settings - Fork 20
feat: add support for Co-authored-by commit trailers #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:
|
contributors.py
Outdated
| start_date: str, | ||
| end_date: str, | ||
| ghe: str, | ||
| acknowledge_coauthors: bool = False, |
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.
@copilot why set this to false if the configuration file has true by default. Maybe it's better not to have a default here?
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.
Removed default values from both get_contributors() and get_all_contributors() function parameters in commit 4454fe7. The acknowledge_coauthors parameter is now always explicitly passed from the configuration, eliminating the inconsistency.
|
@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:
|
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 contributionsget_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 extracts co-author identifiers:username@users.noreply.github.com) - extracts the usernamejohn@example.com) - uses the full email address as the identifierExample commit message:
Co-authors are added as contributors with contribution counts reflecting the number of commits they co-authored. 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.