From 379c7631a563191cbbb83fa8b812fd8cc8707684 Mon Sep 17 00:00:00 2001 From: Samuel Ryan Date: Sun, 5 Feb 2023 18:12:30 +0000 Subject: [PATCH 1/3] feat: Default `repo-token` to GitHub token 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. --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 61aadc57..c78a20f0 100644 --- a/action.yml +++ b/action.yml @@ -9,6 +9,7 @@ inputs: repo-token: description: "Token with permissions to do repo things" required: false + default: "${{ github.token }}" runs: using: "node16" From 27e1fc0b526328f26a791975bf2a8501d83c542f Mon Sep 17 00:00:00 2001 From: Samuel Ryan Date: Sat, 11 Feb 2023 17:05:03 +0000 Subject: [PATCH 2/3] docs: Describe use of `GITHUB_TOKEN` as default `repo-token` --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f2d0bf99..9a017ae5 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,9 @@ Can be an exact version (e.g., `3.4.2`) or a version range (e.g., `3.x`). ### `repo-token` -(**Optional**) GitHub access token used for GitHub API requests. -Heavy usage of the action can result in workflow run failures caused by rate limiting. GitHub provides a more generous allowance for Authenticated API requests. +[GitHub access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) used for GitHub API requests. -It will be convenient to use [`${{ secrets.GITHUB_TOKEN }}`](https://docs.github.com/en/actions/reference/authentication-in-a-workflow). +**Default**: [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) ## Usage From 8b5dfa8b70c0e492a18892817abb2862ee9927ec Mon Sep 17 00:00:00 2001 From: Samuel Ryan Date: Tue, 14 Feb 2023 12:48:32 +0000 Subject: [PATCH 3/3] docs: Replace redirecting link with final destination Co-authored-by: per1234 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a017ae5..303bf3de 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Can be an exact version (e.g., `3.4.2`) or a version range (e.g., `3.x`). [GitHub access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) used for GitHub API requests. -**Default**: [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) +**Default**: [`GITHUB_TOKEN`](https://docs.github.com/actions/security-guides/automatic-token-authentication) ## Usage