github icon indicating copy to clipboard operation
github copied to clipboard

Feature Request: Add `author.login` to `context.commit` for Improved Commit Author Identification

Open babblebey opened this issue 1 year ago β€’ 5 comments

Currently, the context.commit object in the semantic-release/github plugin includes the author object with the following properties:

  • author.name: The name of the commit author.
  • author.email: The email of the commit author.
  • author.short: The date of the commit.

While these details are useful, adding the author.login property would be beneficial. The author.login would provide the GitHub/GitLab username of the commit author, allowing for easier association of commits with users in the open-source community.

Use Case:

One practical application of the author.login property is in generating release notes. For example, a releaseBodyTemplate could utilize the author.login to include a more personalized and identifiable reference to contributors as requested in https://github.com/semantic-release/github/issues/805. Here’s a sample config value demo'ing usage...

const releaseBodyTemplate =  `
## Contributors
<% _.forEach(commits, function(commit) { %>
  <img src="https://github.com/<%- commit.author.login %>.png" alt="<%- commit.author.login %>" width="50">
<% }) %>
`;

This addition would enhance the visibility of contributors in release notes and improve the overall attribution process.

Request:

Please consider adding the author.login property to the author object within the context.commit. This enhancement will facilitate better integration with user identities on GitHub/GitLab and improve the generation of release notes and other related tasks.

babblebey avatar Aug 23 '24 17:08 babblebey

Following a conversation with @gr2m about this, we resolved that....

  • Feature would be nice to have for sure βœ…
  • But, How many people needs this feature though? πŸ€” --- Ummm I do βœ‹
  • The Limitation of this is that we are getting the context.commit items from the local git instance of a project within where there isn't access to a user's username/login, email and name are safer options as author id for commits in this context; hence.....
  • Getting/providing access to commit author username/login would require new computation for the author within the respective github/gitlab/other platform plugin; but it is important to state that....
  • The context.commit property should never be altered within any plugin, i.e. when the commit author username/login has been fetched, we should not attempt adding the property author.login to the object.... As this might lead to some side effects.... We can instead create an entirely new object that can be available within the context of the respective plugin where this additional data was fetched for consumption instead.

babblebey avatar Sep 02 '24 18:09 babblebey

Work is currently being done here for this - https://github.com/jo-gross/semantic-release-notes-with-contributor πŸ˜‰

sbabblebey avatar Feb 22 '25 20:02 sbabblebey

Work is currently being done here for this - https://github.com/jo-gross/semantic-release-notes-with-contributor πŸ˜‰

Nice

babblebey avatar Mar 28 '25 22:03 babblebey

Mr @babblebey is so productive, he needs two accounts to spread it out to not overwhelm GitHub πŸ˜†

gr2m avatar Mar 31 '25 21:03 gr2m