Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: default the github_token input to ${{ github.token }} #309

Open
sean-krail opened this issue May 19, 2020 · 1 comment · May be fixed by #624
Open

feat: default the github_token input to ${{ github.token }} #309

sean-krail opened this issue May 19, 2020 · 1 comment · May be fixed by #624
Assignees
Labels
enhancement New feature or request proposal
Milestone

Comments

@sean-krail
Copy link

Is your feature request related to a problem? Please describe

Forcing users to add github_token: ${{ secrets.GITHUB_TOKEN }} adds unnecessary boilerplate, since its possible to extract this token in the action.yml file (see here for an example).

Describe the solution you'd like

Update the action.yml file to default the github_token input to ${{ github.token }}, then if users want to use a personal access token or deploy key instead they can set those inputs to override it.

@peaceiris
Copy link
Owner

peaceiris commented May 19, 2020

Thank you for suggesting this.

When I found this feature at actions/checkout a few months ago, other official actions were still using an empty token input so I ignored to apply it to this action. I thought that it was friendly to notify users that this action will use a built-in token. Today, only 3 official actions are using the default: ${{ github.token }} approach.

Using the default: ${{ github.token }}:

Using an empty token input:

Personally, I think the time for using the default: ${{ github.token }} approach has come. The above 4 official actions will also start to use the approach.

OK. I will work on this. Note that we have some considerations for using the approach. In this action, we need to manage the order of auth tokens and the behavior on fork repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants