-
Notifications
You must be signed in to change notification settings - Fork 15
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 repo-token
to GitHub token
#642
base: main
Are you sure you want to change the base?
Conversation
The absence of a default value for `repo-token` means that this action may start to fail long after it has been implemented by a developer: the developer adds the action to their workflow (without a token because it's optional) and then, at some point in the future, their workflows may *randomly* start to fail because they've hit the unauthenticated rate-limit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! This seems to be the standard way to do it.
@LeoDog896 Yep, sorry, I should have noted that this is the standard approach. Just to catch one concern that might come up: although adding
Separate from the above, while reviewing this Pull Request again, I've noticed I missed making a change to the README. At the moment the README says:
I think something like this might be clearer in light of this change:
Let me know if that sounds like a more helpful description, and I'll update this Pull Request to include the README change too :) Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR @shrink!
I think something like this might be clearer in light of this change:
I think the best thing is to follow Arduino's established format for documenting default input values, as is already used for the version
input.
Here is an example of how the default token value was documented in one of Arduino's other actions:
Thank you very much, I agree, consistency is best! I've added the established format. |
Co-authored-by: per1234 <[email protected]>
Requested changes have been made. Thanks!
@andreynering you're right, thank you for catching the mistake. I deleted some unused forks (or so I thought): I missed that this Pull Request was still open. I've asked GitHub to restore the repository so the Pull Request is now re-opened. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be improved to account for enterprise servers, but this can be done in a future update if need be, since other code sections might be affected by this as well.
@@ -9,6 +9,7 @@ inputs: | |||
repo-token: | |||
description: "Token with permissions to do repo things" | |||
required: false | |||
default: "${{ github.token }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be replaced with default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
as in actions/setup-go.
The absence of a default value for
repo-token
means that this action may start to fail long after it has been implemented by a developer: the developer adds the action to their workflow (without a token because it's optional) and then, at some point in the future, their workflows may randomly start to fail because they've hit the unauthenticated rate-limit.