From 4aa28c9b8b2dbf3470ae57e26c04e0917bd6045a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Thu, 9 Sep 2021 16:41:13 +0200 Subject: [PATCH 1/8] feat: default `repo-token` to `github.token` --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index 16e71a8d1..751f8b08f 100644 --- a/action.yml +++ b/action.yml @@ -4,6 +4,8 @@ author: 'GitHub' inputs: repo-token: description: 'The GITHUB_TOKEN secret' + required: false + default: ${{ github.token }} configuration-path: description: 'The path for the label configurations' default: '.github/labeler.yml' From 243fcc2a2e3f807df7a92f1f45436f49dc3b9f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Thu, 9 Sep 2021 16:43:11 +0200 Subject: [PATCH 2/8] Update README.md --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bf944bcbd..dbf71bbdc 100644 --- a/README.md +++ b/README.md @@ -98,21 +98,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/labeler@v3 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" ``` -_Note: This grants access to the `GITHUB_TOKEN` so the action can make calls to GitHub's rest API_ - #### Inputs Various inputs are defined in [`action.yml`](action.yml) to let you configure the labeler: | Name | Description | Default | | - | - | - | -| `repo-token` | Token to use to authorize label changes. Typically the GITHUB_TOKEN secret | N/A | +| `repo-token` | Token to use to authorize label changes. Typically the GITHUB_TOKEN secret | `github.token` | | `configuration-path` | The path to the label configuration file | `.github/labeler.yml` | -| `sync-labels` | Whether or not to remove labels when matching files are reverted or no longer changed by the PR | `false` +| `sync-labels` | Whether or not to remove labels when matching files are reverted or no longer changed by the PR | `false`| # Contributions From 19472a90e498b90c18806b9c9060d6d025700949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Thu, 9 Sep 2021 16:44:54 +0200 Subject: [PATCH 3/8] Update labeler.ts --- src/labeler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/labeler.ts b/src/labeler.ts index 59cf23f32..e2942fad4 100644 --- a/src/labeler.ts +++ b/src/labeler.ts @@ -13,7 +13,7 @@ type ClientType = ReturnType; export async function run() { try { - const token = core.getInput("repo-token", { required: true }); + const token = core.getInput("repo-token"); const configPath = core.getInput("configuration-path", { required: true }); const syncLabels = !!core.getInput("sync-labels", { required: false }); From 7d4bb7b53813468427b482b51f892a0a4162cef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Thu, 9 Sep 2021 16:46:43 +0200 Subject: [PATCH 4/8] Update index.js --- dist/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index a4b5fdf0e..fa7b8c438 100644 --- a/dist/index.js +++ b/dist/index.js @@ -43,7 +43,7 @@ const minimatch_1 = __nccwpck_require__(3973); function run() { return __awaiter(this, void 0, void 0, function* () { try { - const token = core.getInput("repo-token", { required: true }); + const token = core.getInput("repo-token"); const configPath = core.getInput("configuration-path", { required: true }); const syncLabels = !!core.getInput("sync-labels", { required: false }); const prNumber = getPrNumber(); @@ -11859,4 +11859,4 @@ labeler_1.run(); module.exports = __webpack_exports__; /******/ })() -; \ No newline at end of file +; From 0aa62c6e42a2136bcd10457258f737e56cf1c993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Tue, 28 Feb 2023 15:39:56 +0100 Subject: [PATCH 5/8] Update action.yml --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 6dabfa7e7..a3df342b6 100644 --- a/action.yml +++ b/action.yml @@ -3,7 +3,7 @@ description: 'Automatically label new pull requests based on the paths of files author: 'GitHub' inputs: repo-token: - description: 'The GITHUB_TOKEN secret' + description: 'The GitHub token used to manage labels' required: false default: ${{ github.token }} configuration-path: From 70d5eb205579c0847ab238464f4365723b18fa37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Tue, 28 Feb 2023 16:06:33 +0100 Subject: [PATCH 6/8] Update dist/index.js --- dist/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/dist/index.js b/dist/index.js index 78b0c2adb..8bef7da41 100644 --- a/dist/index.js +++ b/dist/index.js @@ -15252,3 +15252,4 @@ const labeler_1 = __nccwpck_require__(5272); module.exports = __webpack_exports__; /******/ })() ; + From d4636bb1ee848b0ea3b2f43304827cdeb874a5b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Tue, 28 Feb 2023 16:08:59 +0100 Subject: [PATCH 7/8] Update index.js --- dist/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 8bef7da41..78b0c2adb 100644 --- a/dist/index.js +++ b/dist/index.js @@ -15252,4 +15252,3 @@ const labeler_1 = __nccwpck_require__(5272); module.exports = __webpack_exports__; /******/ })() ; - From 46219767fe60be92809df549f45ac1e47e509691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Tue, 28 Feb 2023 16:12:42 +0100 Subject: [PATCH 8/8] Update dist/index.js --- dist/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 78b0c2adb..014496405 100644 --- a/dist/index.js +++ b/dist/index.js @@ -15251,4 +15251,4 @@ const labeler_1 = __nccwpck_require__(5272); module.exports = __webpack_exports__; /******/ })() -; +; \ No newline at end of file