From 5303adfa1906f1005f852526099525388568ab1f Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Wed, 21 Oct 2020 13:06:06 +0300 Subject: [PATCH 1/3] fix(lock-closed): update `policyUrl` in `bundle.js` In #77, `policyUrl` was fixed in `src/main.ts`, but not in the built file that is actually used when running the action (`lib/bundle.js`). As a result, the change did not take effect. This commit updates `policyUrl` to `lib/bundle.js` as well. This will help address angular/angular#39358 (once [lock-closed.yml][1] is updated in all affected repositories). [1]: https://github.com/angular/angular/blob/cfac8e0764498713f63a2335b46823e8a9b285c5/.github/workflows/lock-closed.yml#L13 --- github-actions/lock-closed/lib/bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-actions/lock-closed/lib/bundle.js b/github-actions/lock-closed/lib/bundle.js index 90c5100f7..cc7a2804c 100644 --- a/github-actions/lock-closed/lib/bundle.js +++ b/github-actions/lock-closed/lib/bundle.js @@ -26096,7 +26096,7 @@ async function run() { // Fixed amount of days a closed issue must be inactive before being locked const days = 30; // Standardized Angular Team message for locking issues - const policyUrl = 'https://github.com/angular/angular/blob/67d80f/docs/GITHUB_PROCESS.md#conversation-locking'; + const policyUrl = 'https://github.com/angular/angular/blob/8f24bc9443b3872fe095d9f7f77b308a361a13b4/docs/GITHUB_PROCESS.md#conversation-locking'; const message = 'This issue has been automatically locked due to inactivity.\n' + 'Please file a new issue if you are encountering a similar or related problem.\n\n' + `Read more about our [automatic conversation locking policy](${policyUrl}).\n\n` + From c9b49f18d993e3f8be962e56defa7331ed6830a3 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Wed, 21 Oct 2020 13:13:23 +0300 Subject: [PATCH 2/3] fix(lock-closed): fix `main` field in `package.json` Change the `main` field in `package.json` to point to the correct file, i.e. `lib/bundle.js` instead of `lib/main.js`. This doesn't have any practical effect, since [action.yml][1] specifies the actual entry-point used for the action, but it avoids confusion. [1]: https://github.com/angular/dev-infra/blob/414834b2b24dd2df37c6ed00808387ee6fd91b66/github-actions/lock-closed/action.yml#L13 --- github-actions/lock-closed/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-actions/lock-closed/package.json b/github-actions/lock-closed/package.json index e1ac7e4f8..595739f2f 100644 --- a/github-actions/lock-closed/package.json +++ b/github-actions/lock-closed/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "private": true, "description": "Locks issues that are both closed and inactive", - "main": "lib/main.js", + "main": "lib/bundle.js", "scripts": { "build": "rollup --config" }, From 8f2afa9e221913ac9067cca6a41448387d107a69 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Wed, 21 Oct 2020 13:27:06 +0300 Subject: [PATCH 3/3] docs(lock-closed): update `inputs` in `action.yml` (github-token --> lock-bot-token) In PR #40, the authentication used by the `lock-closed` action was changed. As part of this change, the `github-token` input parameter was replaced by `lock-bot-token`. However, `lock-closed/action.yml` was not updated accordingly, resulting in the following warning ([example][1]): > Unexpected input(s) 'lock-bot-key', valid inputs are > ['github-token', 'locks-per-execution'] This commit gets rid of the warnings by updating `action.yml` to list the correct inputs. [1]: https://github.com/angular/angular/actions/runs/318094899 --- github-actions/lock-closed/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github-actions/lock-closed/action.yml b/github-actions/lock-closed/action.yml index 53029c06b..7bf8b52c4 100644 --- a/github-actions/lock-closed/action.yml +++ b/github-actions/lock-closed/action.yml @@ -2,8 +2,8 @@ name: 'Lock Closed Issues' description: 'Locks issues that are both closed and inactive' author: 'Angular' inputs: - github-token: - description: 'Github access token' + lock-bot-token: + description: 'A private key for the Lock Bot GitHub app' required: true locks-per-execution: description: 'Maximum number of issue locks per action execution'