semantic-release / semantic-release/github

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

Open
#905 4 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
534
Forks
150
Avg merge
1m
Merged PRs (30d)
3

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the semantic-release/github plugin builds context.commit and its author object. Check the existing tests around commit context if available, then verify that author.login is exposed and can be used by the shown releaseBodyTemplate example without breaking existing author fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, javascript
Domain
release
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.