Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 3, 2025

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

  • New env var ACKNOWLEDGE_COAUTHORS (default: True) - enables co-author detection out of the box
  • get_coauthors_from_message() - parses Co-authored-by: trailers from commit messages
  • get_coauthor_contributors() - iterates commits to aggregate co-author contributions
  • Modified get_contributors() - integrates co-author detection when enabled

How it works

The action now scans commit messages by default for trailers in the GitHub noreply format:

Co-authored-by: Name <username@users.noreply.github.com>

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.

Usage

The feature is enabled by default. To disable it:

- name: Run contributor action
  uses: github/contributors@v1
  env:
    GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    ACKNOWLEDGE_COAUTHORS: "false"

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing
  • If publishing new data to the public (scorecards, security scan results, code quality results, live dashboards, etc.), please request review from @jeffrey-luszcz

Reviewer

  • Label as either bug, documentation, enhancement, infrastructure, maintenance or breaking
Original prompt

This section details on the original issue you should resolve

<issue_title>Commits might be created by multiple authors. GitHub supports Co-authored-by: for this.</issue_title>
<issue_description>Commits might be created by multiple authors. GitHub supports Co-authored-by: for this.

The action should also report users with Co-authored-by.


Sometimes, one can get the user information by crawling the commits of the PR. I did that in https://github.com/koppor/github-contributors-list. Would be nice if this action supported this as well.

Originally posted by @koppor in #371</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 3, 2025 23:01
Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for commits by multiple authors feat: add support for Co-authored-by commit trailers Dec 3, 2025
Copilot AI requested a review from zkoppert December 3, 2025 23:05
@zkoppert zkoppert added enhancement New feature or request and removed feature labels Dec 8, 2025
@zkoppert
Copy link
Member

zkoppert commented Dec 8, 2025

@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>
Copy link
Contributor Author

Copilot AI commented Dec 8, 2025

@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 ...

Changed default to True in commit 9798816. Updated:

  • env.py: Default parameter changed to True
  • README.md: Default value in table changed to True
  • .env-example: Example value changed to "True"
  • test_env.py: Test assertions updated to expect True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request release

Projects

None yet

2 participants