amannn / amannn/action-semantic-pull-request
Make GITHUB_TOKEN an action input
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
It's a nuance, but there shouldn't be a need to input GITHUB_TOKEN if it can be avoided.
It may also help resolve #232.
An example implementation:
# action.yml
inputs:
githubToken:
description: "The GitHub access token (e.g. secrets.GITHUB_TOKEN) used to ... This defaults to {{ github.token }}."
default: "${{ github.token }}"
required: false
// src/index.js
const githubToken = core.getInput("githubToken", {required: true})
// OR
// src/parseConfig.js
let githubToken;
if (process.env.INPUT_GITHUBTOKEN) {
githubToken = ConfigParser.parseString(process.env.INPUT_GITHUBTOKEN)
}
// src/index.js
const client = github.getOctokit(githubToken, {
baseUrl: githubBaseUrl
});
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with action.yml and trace the current token handling in src/index.js or src/parseConfig.js. Check how the action resolves its token and passes it to the Octokit client; done means an explicit GITHUB_TOKEN input is optional while the resolved token still reaches the client, with the behavior related to #232 considered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, javascript
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100