From b435530b772aabbe69115984e1ab58cf1cf09860 Mon Sep 17 00:00:00 2001 From: MaksimZhukov <46996400+MaksimZhukov@users.noreply.github.com> Date: Thu, 12 Jan 2023 13:52:12 +0100 Subject: [PATCH 1/6] Update release-new-action-version.yml (#479) --- .github/workflows/release-new-action-version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release-new-action-version.yml index a187d1ab..b95570f8 100644 --- a/.github/workflows/release-new-action-version.yml +++ b/.github/workflows/release-new-action-version.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Update the ${{ env.TAG_NAME }} tag - uses: actions/publish-action@v0.2.1 + uses: actions/publish-action@v0.2.2 with: source-tag: ${{ env.TAG_NAME }} slack-webhook: ${{ secrets.SLACK_WEBHOOK }} From d4bda4db14c4869b732f0d7b87fc5659736c38f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Jan 2023 15:00:59 +0000 Subject: [PATCH 2/6] Bump @vercel/ncc from 0.36.0 to 0.36.1 Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.36.0 to 0.36.1. - [Release notes](https://github.com/vercel/ncc/releases) - [Commits](https://github.com/vercel/ncc/compare/0.36.0...0.36.1) --- updated-dependencies: - dependency-name: "@vercel/ncc" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 97ce9bbc..8de92f0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "@types/js-yaml": "^4.0.5", "@types/minimatch": "^5.1.2", "@types/node": "^16.11.7", - "@vercel/ncc": "^0.36.0", + "@vercel/ncc": "^0.36.1", "jest": "^27.5.1", "prettier": "^2.8.1", "ts-jest": "^27.1.3", @@ -1210,9 +1210,9 @@ "dev": true }, "node_modules/@vercel/ncc": { - "version": "0.36.0", - "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.0.tgz", - "integrity": "sha512-/ZTUJ/ZkRt694k7KJNimgmHjtQcRuVwsST2Z6XfYveQIuBbHR+EqkTc1jfgPkQmMyk/vtpxo3nVxe8CNuau86A==", + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.1.tgz", + "integrity": "sha512-S4cL7Taa9yb5qbv+6wLgiKVZ03Qfkc4jGRuiUQMQ8HGBD5pcNRnHeYM33zBvJE4/zJGjJJ8GScB+WmTsn9mORw==", "dev": true, "bin": { "ncc": "dist/ncc/cli.js" @@ -5489,9 +5489,9 @@ "dev": true }, "@vercel/ncc": { - "version": "0.36.0", - "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.0.tgz", - "integrity": "sha512-/ZTUJ/ZkRt694k7KJNimgmHjtQcRuVwsST2Z6XfYveQIuBbHR+EqkTc1jfgPkQmMyk/vtpxo3nVxe8CNuau86A==", + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.1.tgz", + "integrity": "sha512-S4cL7Taa9yb5qbv+6wLgiKVZ03Qfkc4jGRuiUQMQ8HGBD5pcNRnHeYM33zBvJE4/zJGjJJ8GScB+WmTsn9mORw==", "dev": true }, "abab": { diff --git a/package.json b/package.json index f8f7abf1..29028b39 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@types/node": "^16.11.7", "@types/minimatch": "^5.1.2", "@types/js-yaml": "^4.0.5", - "@vercel/ncc": "^0.36.0", + "@vercel/ncc": "^0.36.1", "jest": "^27.5.1", "prettier": "^2.8.1", "ts-jest": "^27.1.3", From 8e3e86e54863b31f629243ff47fe86916fb2a568 Mon Sep 17 00:00:00 2001 From: Ivan <98037481+IvanZosimov@users.noreply.github.com> Date: Tue, 31 Jan 2023 08:47:18 +0200 Subject: [PATCH 3/6] Update workflow badges (#495) --- README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index b6585c6d..78690ed8 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,6 @@ # Pull Request Labeler -

- - basic validation status - - - dependencies - -

+[![Basic validation](https://github.com/actions/labeler/actions/workflows/basic-validation.yml/badge.svg?branch=main)](https://github.com/actions/labeler/actions/workflows/basic-validation.yml) Automatically label new pull requests based on the paths of files being changed. From 826c4e60e2f66263db6d3654ac27d572cbf2a56e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Jan 2023 15:01:02 +0000 Subject: [PATCH 4/6] Bump typescript from 4.9.4 to 4.9.5 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.4 to 4.9.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/commits) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 97ce9bbc..572aa476 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "jest": "^27.5.1", "prettier": "^2.8.1", "ts-jest": "^27.1.3", - "typescript": "^4.9.4" + "typescript": "^4.9.5" } }, "node_modules/@actions/core": { @@ -4220,9 +4220,9 @@ } }, "node_modules/typescript": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", - "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -7751,9 +7751,9 @@ } }, "typescript": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", - "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true }, "universal-user-agent": { diff --git a/package.json b/package.json index f8f7abf1..b0eeb293 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,6 @@ "jest": "^27.5.1", "prettier": "^2.8.1", "ts-jest": "^27.1.3", - "typescript": "^4.9.4" + "typescript": "^4.9.5" } } From cfabdea1fa3e7d9ca707f07ea426103adc0b0067 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Feb 2023 15:00:39 +0000 Subject: [PATCH 5/6] Bump prettier from 2.8.2 to 2.8.4 Bumps [prettier](https://github.com/prettier/prettier) from 2.8.2 to 2.8.4. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.8.2...2.8.4) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 97ce9bbc..351010af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "@types/node": "^16.11.7", "@vercel/ncc": "^0.36.0", "jest": "^27.5.1", - "prettier": "^2.8.1", + "prettier": "^2.8.4", "ts-jest": "^27.1.3", "typescript": "^4.9.4" } @@ -3606,9 +3606,9 @@ } }, "node_modules/prettier": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.2.tgz", - "integrity": "sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", + "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -7308,9 +7308,9 @@ "dev": true }, "prettier": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.2.tgz", - "integrity": "sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", + "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", "dev": true }, "pretty-format": { diff --git a/package.json b/package.json index f8f7abf1..0429016d 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@types/js-yaml": "^4.0.5", "@vercel/ncc": "^0.36.0", "jest": "^27.5.1", - "prettier": "^2.8.1", + "prettier": "^2.8.4", "ts-jest": "^27.1.3", "typescript": "^4.9.4" } From ba790c862c380240c6d5e7427be5ace9a05c754b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Tue, 7 Mar 2023 12:25:56 +0100 Subject: [PATCH 6/6] feat: default `repo-token` to `github.token` (#227) * feat: default `repo-token` to `github.token` * Update README.md * Update labeler.ts * Update index.js * Update action.yml * Update dist/index.js * Update index.js * Update dist/index.js --- README.md | 8 ++------ action.yml | 4 +++- dist/index.js | 2 +- src/labeler.ts | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 78690ed8..47bc342c 100644 --- a/README.md +++ b/README.md @@ -99,21 +99,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/labeler@v4 - 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, with `contents:read` and `pull-requests:write` access | N/A | +| `repo-token` | Token to use to authorize label changes. Typically the GITHUB_TOKEN secret, with `contents:read` and `pull-requests:write` access | `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 diff --git a/action.yml b/action.yml index 42e8a7a2..a3df342b 100644 --- a/action.yml +++ b/action.yml @@ -3,7 +3,9 @@ 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: description: 'The path for the label configurations' default: '.github/labeler.yml' diff --git a/dist/index.js b/dist/index.js index 4b521af6..01449640 100644 --- a/dist/index.js +++ b/dist/index.js @@ -47,7 +47,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(); diff --git a/src/labeler.ts b/src/labeler.ts index b33073ad..88bf64a4 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});