Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Support for co-authors #14

Description

@nebbles

To support co-authors on GitHub, the following trailer needs to be added to the commit

Co-authored-by: Firstname Lastname <some.one@example.foo>
  • There must be at least one blank line between this line and the previous lines of the commit (two is recommended)

Additional features:

  • It would be useful if gitcommit can cache these authors and save them in a global config since typing them out every time would become a pain.
  • It would be very useful if you could type in a GitHub username e.g. nebbles@gh and gitcommit automatically detects and attempts to resolve the public email from the GitHub profile page (and possibly full name?)

Activity

  1. added this to the 1.0 milestone on Nov 5, 2019
  2. nebbles commented on May 9, 2020

    @nebbles
    OwnerAuthor

    As previously mentioned, the exact specification on how to add a co-author as a 'trailer' to the commit message can be found here:

    https://help.github.com/en/github/committing-changes-to-your-project/creating-a-commit-with-multiple-authors

    Support for coauthors was added to the GitHub desktop app. In this app, the authors are resolved through the API via a mentionable user.

    The source code for getting mentionable for a particular repository:

    https://github.com/desktop/desktop/blob/ab28d00115081f70bf773d36216dad4ab15be10a/app/src/lib/api.ts#L962

    There is also an API endpoint for getting the public email addresses of a particular GitHub user:

    https://developer.github.com/v3/users/emails/#list-public-email-addresses-for-a-user

    This PR for Atom, discusses adding mentionable users with the GitHub GraphQL API

    https://github.com/atom/github/pull/1476/files#diff-961f5e053a04f04fd4a96b42712e4dc4R133

    The line of interest where the GraphQL request is made, can be found here

    https://github.com/atom/github/blob/dd9647641beb263253c5678b888b7964c5c675cb/lib/models/user-store.js#L140

    The documentation for the repository object on the GitHub GraphQL API can be found here

    https://developer.github.com/v4/object/repository/

    The Atom repository may be of interest as they also implemented using local git history in order to determine mentionable git users.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions