From 0d6f83007122d952cf222d03c8a3f6460c3a80fe Mon Sep 17 00:00:00 2001 From: Francesco Renzi Date: Fri, 7 Oct 2022 11:12:02 +0100 Subject: [PATCH 01/12] Update changelog for 6.0.1 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61a53b4ab..6d69fb669 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +# [6.0.1] + +Update @actions/core to v1.10.0 ([#839](https://github.com/actions/stale/pull/839)) + # [6.0.0] :warning: Breaking change :warning: From 65b52aff67b46a817f078f5b004787c9759ceac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Reinoso=20Garc=C3=ADa?= Date: Wed, 19 Oct 2022 12:08:31 +0200 Subject: [PATCH 02/12] Allow daysBeforeStale options to be float (#841) * feat: allow daysBeforeStale options to be float * update dist --- __tests__/main.spec.ts | 177 +++++++++++++++++++++++++++++++++++++++++ dist/index.js | 19 +++-- src/main.ts | 20 +++-- 3 files changed, 200 insertions(+), 16 deletions(-) diff --git a/__tests__/main.spec.ts b/__tests__/main.spec.ts index eba2e9dfe..218825471 100644 --- a/__tests__/main.spec.ts +++ b/__tests__/main.spec.ts @@ -1998,6 +1998,84 @@ test('processing an issue opened since 2 days and with the option "daysBeforeIss expect(processor.closedIssues).toHaveLength(0); }); +test('processing an issue opened since 1 hour and with the option "daysBeforeIssueStale" at 0.1666666667 (4 hours) will not make it stale', async () => { + expect.assertions(2); + const opts: IIssuesProcessorOptions = { + ...DefaultProcessorOptions, + daysBeforeStale: 10, + daysBeforeIssueStale: 0.1666666667 + }; + const issueDate = new Date(); + issueDate.setHours(issueDate.getHours() - 1); + const TestIssueList: Issue[] = [ + generateIssue(opts, 1, 'An issue with no label', issueDate.toISOString()) + ]; + const processor = new IssuesProcessorMock( + opts, + async p => (p === 1 ? TestIssueList : []), + async () => [], + async () => new Date().toISOString() + ); + + // process our fake issue list + await processor.processIssues(1); + + expect(processor.staleIssues).toHaveLength(0); + expect(processor.closedIssues).toHaveLength(0); +}); + +test('processing an issue opened since 4 hours and with the option "daysBeforeIssueStale" at 0.1666666667 (4 hours) will make it stale', async () => { + expect.assertions(2); + const opts: IIssuesProcessorOptions = { + ...DefaultProcessorOptions, + daysBeforeStale: 10, + daysBeforeIssueStale: 0.1666666667 + }; + const issueDate = new Date(); + issueDate.setHours(issueDate.getHours() - 4); + const TestIssueList: Issue[] = [ + generateIssue(opts, 1, 'An issue with no label', issueDate.toISOString()) + ]; + const processor = new IssuesProcessorMock( + opts, + async p => (p === 1 ? TestIssueList : []), + async () => [], + async () => new Date().toISOString() + ); + + // process our fake issue list + await processor.processIssues(1); + + expect(processor.staleIssues).toHaveLength(1); + expect(processor.closedIssues).toHaveLength(0); +}); + +test('processing an issue opened since 5 hours and with the option "daysBeforeIssueStale" at 0.1666666667 (4 hours) will make it stale', async () => { + expect.assertions(2); + const opts: IIssuesProcessorOptions = { + ...DefaultProcessorOptions, + daysBeforeStale: 10, + daysBeforeIssueStale: 0.1666666667 + }; + const issueDate = new Date(); + issueDate.setHours(issueDate.getHours() - 5); + const TestIssueList: Issue[] = [ + generateIssue(opts, 1, 'An issue with no label', issueDate.toISOString()) + ]; + const processor = new IssuesProcessorMock( + opts, + async p => (p === 1 ? TestIssueList : []), + async () => [], + async () => new Date().toISOString() + ); + + // process our fake issue list + await processor.processIssues(1); + + expect(processor.staleIssues).toHaveLength(1); + expect(processor.closedIssues).toHaveLength(0); +}); + test('processing a pull request opened since 2 days and with the option "daysBeforePrStale" at 3 will not make it stale', async () => { expect.assertions(2); const opts: IIssuesProcessorOptions = { @@ -2097,6 +2175,105 @@ test('processing a pull request opened since 2 days and with the option "daysBef expect(processor.closedIssues).toHaveLength(0); }); +test('processing a pull request opened since 1 hour and with the option "daysBeforePrStale" at 0.1666666667 (4 hours) will not make it stale', async () => { + expect.assertions(2); + const opts: IIssuesProcessorOptions = { + ...DefaultProcessorOptions, + daysBeforeStale: 10, + daysBeforePrStale: 0.1666666667 + }; + const issueDate = new Date(); + issueDate.setHours(issueDate.getHours() - 1); + const TestIssueList: Issue[] = [ + generateIssue( + opts, + 1, + 'A pull request with no label', + issueDate.toISOString(), + issueDate.toISOString(), + true + ) + ]; + const processor = new IssuesProcessorMock( + opts, + async p => (p === 1 ? TestIssueList : []), + async () => [], + async () => new Date().toISOString() + ); + + // process our fake issue list + await processor.processIssues(1); + + expect(processor.staleIssues).toHaveLength(0); + expect(processor.closedIssues).toHaveLength(0); +}); + +test('processing a pull request opened since 4 hours and with the option "daysBeforePrStale" at 0.1666666667 (4 hours) will make it stale', async () => { + expect.assertions(2); + const opts: IIssuesProcessorOptions = { + ...DefaultProcessorOptions, + daysBeforeStale: 10, + daysBeforePrStale: 0.1666666667 + }; + const issueDate = new Date(); + issueDate.setHours(issueDate.getHours() - 4); + const TestIssueList: Issue[] = [ + generateIssue( + opts, + 1, + 'A pull request with no label', + issueDate.toISOString(), + issueDate.toISOString(), + true + ) + ]; + const processor = new IssuesProcessorMock( + opts, + async p => (p === 1 ? TestIssueList : []), + async () => [], + async () => new Date().toISOString() + ); + + // process our fake issue list + await processor.processIssues(1); + + expect(processor.staleIssues).toHaveLength(1); + expect(processor.closedIssues).toHaveLength(0); +}); + +test('processing a pull request opened since 5 hours and with the option "daysBeforePrStale" at 0.1666666667 (4 hours) will make it stale', async () => { + expect.assertions(2); + const opts: IIssuesProcessorOptions = { + ...DefaultProcessorOptions, + daysBeforeStale: 10, + daysBeforePrStale: 0.1666666667 + }; + const issueDate = new Date(); + issueDate.setHours(issueDate.getHours() - 5); + const TestIssueList: Issue[] = [ + generateIssue( + opts, + 1, + 'A pull request with no label', + issueDate.toISOString(), + issueDate.toISOString(), + true + ) + ]; + const processor = new IssuesProcessorMock( + opts, + async p => (p === 1 ? TestIssueList : []), + async () => [], + async () => new Date().toISOString() + ); + + // process our fake issue list + await processor.processIssues(1); + + expect(processor.staleIssues).toHaveLength(1); + expect(processor.closedIssues).toHaveLength(0); +}); + test('processing a previously closed issue with a close label will remove the close label', async () => { expect.assertions(1); const opts: IIssuesProcessorOptions = { diff --git a/dist/index.js b/dist/index.js index 96ed9e6fb..0e78fccc9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2183,9 +2183,9 @@ function _getAndValidateArgs() { stalePrMessage: core.getInput('stale-pr-message'), closeIssueMessage: core.getInput('close-issue-message'), closePrMessage: core.getInput('close-pr-message'), - daysBeforeStale: parseInt(core.getInput('days-before-stale', { required: true })), - daysBeforeIssueStale: parseInt(core.getInput('days-before-issue-stale')), - daysBeforePrStale: parseInt(core.getInput('days-before-pr-stale')), + daysBeforeStale: parseFloat(core.getInput('days-before-stale', { required: true })), + daysBeforeIssueStale: parseFloat(core.getInput('days-before-issue-stale')), + daysBeforePrStale: parseFloat(core.getInput('days-before-pr-stale')), daysBeforeClose: parseInt(core.getInput('days-before-close', { required: true })), daysBeforeIssueClose: parseInt(core.getInput('days-before-issue-close')), daysBeforePrClose: parseInt(core.getInput('days-before-pr-close')), @@ -2233,11 +2233,14 @@ function _getAndValidateArgs() { closeIssueReason: core.getInput('close-issue-reason'), includeOnlyAssigned: core.getInput('include-only-assigned') === 'true' }; - for (const numberInput of [ - 'days-before-stale', - 'days-before-close', - 'operations-per-run' - ]) { + for (const numberInput of ['days-before-stale']) { + if (isNaN(parseFloat(core.getInput(numberInput)))) { + const errorMessage = `Option "${numberInput}" did not parse to a valid float`; + core.setFailed(errorMessage); + throw new Error(errorMessage); + } + } + for (const numberInput of ['days-before-close', 'operations-per-run']) { if (isNaN(parseInt(core.getInput(numberInput)))) { const errorMessage = `Option "${numberInput}" did not parse to a valid integer`; core.setFailed(errorMessage); diff --git a/src/main.ts b/src/main.ts index 4b7adeab6..1045d6c57 100644 --- a/src/main.ts +++ b/src/main.ts @@ -28,11 +28,11 @@ function _getAndValidateArgs(): IIssuesProcessorOptions { stalePrMessage: core.getInput('stale-pr-message'), closeIssueMessage: core.getInput('close-issue-message'), closePrMessage: core.getInput('close-pr-message'), - daysBeforeStale: parseInt( + daysBeforeStale: parseFloat( core.getInput('days-before-stale', {required: true}) ), - daysBeforeIssueStale: parseInt(core.getInput('days-before-issue-stale')), - daysBeforePrStale: parseInt(core.getInput('days-before-pr-stale')), + daysBeforeIssueStale: parseFloat(core.getInput('days-before-issue-stale')), + daysBeforePrStale: parseFloat(core.getInput('days-before-pr-stale')), daysBeforeClose: parseInt( core.getInput('days-before-close', {required: true}) ), @@ -92,11 +92,15 @@ function _getAndValidateArgs(): IIssuesProcessorOptions { includeOnlyAssigned: core.getInput('include-only-assigned') === 'true' }; - for (const numberInput of [ - 'days-before-stale', - 'days-before-close', - 'operations-per-run' - ]) { + for (const numberInput of ['days-before-stale']) { + if (isNaN(parseFloat(core.getInput(numberInput)))) { + const errorMessage = `Option "${numberInput}" did not parse to a valid float`; + core.setFailed(errorMessage); + throw new Error(errorMessage); + } + } + + for (const numberInput of ['days-before-close', 'operations-per-run']) { if (isNaN(parseInt(core.getInput(numberInput)))) { const errorMessage = `Option "${numberInput}" did not parse to a valid integer`; core.setFailed(errorMessage); From f6a9b6accfb53e329ce4ddc15f57eb70c2a821c8 Mon Sep 17 00:00:00 2001 From: Jongwoo Han Date: Wed, 7 Dec 2022 00:59:54 +0900 Subject: [PATCH 03/12] Use cache in check-dist.yml Signed-off-by: jongwooo --- .github/workflows/check-dist.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index a9a41bc1c..4736bfdf9 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -27,6 +27,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: 16.x + cache: npm - name: Install dependencies run: npm ci From 161093d8610f9fb47ed1ee253aa3c4e2e9581e61 Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Thu, 8 Dec 2022 13:27:13 +0100 Subject: [PATCH 04/12] Update the repo to the standards of maintaining team In scope of this commit issues and PR temlates were updated, some workflows were renamed and partly updated, some workflows such as release-new-action-version.yml and licensed.yml were added. The stale.yml workflow was deleted as it was considered as harmful and inconvenient. --- .github/ISSUE_TEMPLATE/bug_report.md | 35 ++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/ISSUE_TEMPLATE/feature-request.md | 16 +++++-- .github/ISSUE_TEMPLATE/other_issue_report.md | 13 ----- .github/ISSUE_TEMPLATE/stale_issue_report.md | 28 ----------- .github/pull_request_template.md | 15 +++--- .github/workflows/build-test.yml | 47 +++++++++++++++++++ .github/workflows/codeql.yml | 8 ++-- .../workflows/{licensed.off => licensed.yml} | 17 ++++--- .../workflows/release-new-action-version.yml | 28 +++++++++++ .github/workflows/stale.yml | 19 -------- .github/workflows/test.yml | 28 ----------- 12 files changed, 146 insertions(+), 110 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/other_issue_report.md delete mode 100644 .github/ISSUE_TEMPLATE/stale_issue_report.md create mode 100644 .github/workflows/build-test.yml rename .github/workflows/{licensed.off => licensed.yml} (55%) create mode 100644 .github/workflows/release-new-action-version.yml delete mode 100644 .github/workflows/stale.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..5b6c5465f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug report +about: Create a bug report +title: '' +labels: bug, needs triage +assignees: '' + +--- + + + + +**Description:** +A clear and concise description of what the bug is. + +**Action version:** +Specify the task version + +**Platform:** +- [ ] Ubuntu +- [ ] macOS +- [ ] Windows + +**Runner type:** +- [ ] Hosted +- [ ] Self-hosted + +**Repro steps:** +A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link. + +**Expected behavior:** +A description of what you expected to happen. + +**Actual behavior:** +A description of what is actually happening. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3ba13e0ce..ec4bb386b 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1 +1 @@ -blank_issues_enabled: false +blank_issues_enabled: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index b8c9c0edf..a54602277 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -1,11 +1,19 @@ --- name: Feature request -about: Propose a new feature or an enhancement +about: Suggest an idea for this project title: '' -labels: enhancement +labels: feature request, needs triage assignees: '' --- -## The problem + + -## The solution +**Description:** +Describe your proposal. + +**Justification:** +Justification or a use case for your proposal. + +**Are you willing to submit a PR?** + \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/other_issue_report.md b/.github/ISSUE_TEMPLATE/other_issue_report.md deleted file mode 100644 index 01c372389..000000000 --- a/.github/ISSUE_TEMPLATE/other_issue_report.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Other issue report -about: Report other issue -title: '' -labels: bug -assignees: '' ---- - -## Describe your issue - -## Further context - - diff --git a/.github/ISSUE_TEMPLATE/stale_issue_report.md b/.github/ISSUE_TEMPLATE/stale_issue_report.md deleted file mode 100644 index 3a64cb86f..000000000 --- a/.github/ISSUE_TEMPLATE/stale_issue_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Stale issue report -about: Report issues with using the stale action -title: '' -labels: bug -assignees: '' ---- - - - -## Describe your issue - -## Your stale action configuration - - - -```yml -jobs: - stale: - runs-on: ... - steps: - - uses: actions/stale@... - with: ... -``` - -## Further context - - diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e778b254f..52e6557e3 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,10 +1,9 @@ - +**Description:** +Describe your changes. -## Changes +**Related issue:** +Add link to the related issue. -- [x] ... - -## Context - - - +**Check list:** +- [ ] Mark if documentation changes are required. +- [ ] Mark if tests were added or updated to cover the changes. diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 000000000..f317ce66b --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,47 @@ +name: Build & Test +on: + pull_request: + paths-ignore: + - '**.md' + push: + branches: + - main + - releases/* + paths-ignore: + - '**.md' + +jobs: + build: + runs-on: ${{ matrix.operating-system }} + strategy: + fail-fast: false + matrix: + operating-system: [ubuntu-latest, windows-latest, macOS-latest] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set Node.js 16 + uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: npm + + - name: Install dependencies + run: npm ci --ignore-scripts + + - name: Format, lint, build and test + run: npm run all:ci + + dry-run-test: # make sure the action works on a clean machine without building + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./ + id: stale + with: + stale-issue-message: 'This issue is stale' + stale-pr-message: 'This PR is stale' + debug-only: true + - name: Print outputs + run: echo ${{ join(steps.stale.outputs.*, ',') }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6b76f3fe9..420182856 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,11 +2,11 @@ name: 'Code scanning' on: push: - branches: - - main + branches: [ main ] pull_request: + branches: [ main ] schedule: - - cron: '0 19 * * 0' + - cron: '23 19 * * 0' jobs: CodeQL-Build: @@ -17,6 +17,8 @@ jobs: - name: Initialize CodeQL uses: github/codeql-action/init@v2 + with: + languages: "javascript" - name: Autobuild uses: github/codeql-action/autobuild@v2 diff --git a/.github/workflows/licensed.off b/.github/workflows/licensed.yml similarity index 55% rename from .github/workflows/licensed.off rename to .github/workflows/licensed.yml index 512ee0d93..867af6e97 100644 --- a/.github/workflows/licensed.off +++ b/.github/workflows/licensed.yml @@ -1,20 +1,25 @@ name: Licensed on: - push: {branches: main} - pull_request: {branches: main} + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: jobs: test: runs-on: ubuntu-latest name: Check licenses steps: - - uses: actions/checkout@v2 - - run: npm ci + - uses: actions/checkout@v3 + - run: npm ci --ignore-scripts - name: Install licensed run: | cd $RUNNER_TEMP - curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz + curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.9.0/licensed-3.9.0-linux-x64.tar.gz sudo tar -xzf licensed.tar.gz sudo mv licensed /usr/local/bin/licensed - - run: licensed status + - run: licensed status \ No newline at end of file diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release-new-action-version.yml new file mode 100644 index 000000000..c5c4bdfcd --- /dev/null +++ b/.github/workflows/release-new-action-version.yml @@ -0,0 +1,28 @@ +name: Release new action version +on: + release: + types: [released] + workflow_dispatch: + inputs: + TAG_NAME: + description: 'Tag name that the major tag will point to' + required: true + +env: + TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} +permissions: + contents: write + +jobs: + update_tag: + name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes + environment: + name: releaseNewActionVersion + runs-on: ubuntu-latest + steps: + - name: Update the ${{ env.TAG_NAME }} tag + id: update-major-tag + uses: actions/publish-action@v0.2.1 + with: + source-tag: ${{ env.TAG_NAME }} + slack-webhook: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index a6f78c1dc..000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: 'Stale issue handler' -on: - workflow_dispatch: - schedule: - - cron: '0 0 * * *' - -jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@main - id: stale - with: - stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days' - days-before-stale: 30 - days-before-close: 5 - exempt-issue-labels: 'blocked,must,should,keep' - - name: Print outputs - run: echo ${{ join(steps.stale.outputs.*, ',') }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 6a6ccd55d..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: 'Build' -on: # rebuild any PRs and main branch changes - pull_request: - push: - branches: - - main - - 'releases/*' - -jobs: - build: # make sure build/ci work properly - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - run: | - npm ci - npm run all:ci - test: # make sure the action works on a clean machine without building - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: ./ - id: stale - with: - stale-issue-message: 'This issue is stale' - stale-pr-message: 'This PR is stale' - debug-only: true - - name: Print outputs - run: echo ${{ join(steps.stale.outputs.*, ',') }} From 97a008721ce15c8ef5216ec117c589a91a5d331b Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Thu, 8 Dec 2022 14:14:09 +0100 Subject: [PATCH 05/12] Update licenses, run prettier on yml files --- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/workflows/build-test.yml | 2 +- .github/workflows/codeql.yml | 6 +- .github/workflows/licensed.yml | 2 +- .../workflows/release-new-action-version.yml | 12 ++-- .licenses/npm/@actions/core.dep.yml | 2 +- .licenses/npm/@actions/github.dep.yml | 2 +- .../npm/@actions/http-client-1.0.11.dep.yml | 32 ++++++++++ ...ient.dep.yml => http-client-2.0.1.dep.yml} | 2 +- .licenses/npm/@octokit/auth-token.dep.yml | 2 +- .licenses/npm/@octokit/core.dep.yml | 2 +- .licenses/npm/@octokit/endpoint.dep.yml | 2 +- .licenses/npm/@octokit/graphql.dep.yml | 2 +- ...uest-log.dep.yml => openapi-types.dep.yml} | 14 ++--- .../npm/@octokit/plugin-paginate-rest.dep.yml | 2 +- ...l => plugin-rest-endpoint-methods.dep.yml} | 2 +- .licenses/npm/@octokit/request-error.dep.yml | 2 +- .licenses/npm/@octokit/request.dep.yml | 2 +- .licenses/npm/@octokit/types.dep.yml | 2 +- .licenses/npm/@types/node.dep.yml | 32 ---------- .licenses/npm/before-after-hook.dep.yml | 2 +- .licenses/npm/is-plain-object.dep.yml | 2 +- .licenses/npm/lodash.deburr.dep.yml | 58 +++++++++++++++++++ .licenses/npm/lru-cache.dep.yml | 26 +++++++++ .licenses/npm/node-fetch.dep.yml | 6 +- .licenses/npm/semver.dep.yml | 4 +- .licenses/npm/tr46.dep.yml | 30 ++++++++++ ...int-methods-4.1.2.dep.yml => uuid.dep.yml} | 18 +++--- .licenses/npm/webidl-conversions.dep.yml | 23 ++++++++ .../rest.dep.yml => whatwg-url.dep.yml} | 17 +++--- .licenses/npm/yallist.dep.yml | 26 +++++++++ 31 files changed, 251 insertions(+), 87 deletions(-) create mode 100644 .licenses/npm/@actions/http-client-1.0.11.dep.yml rename .licenses/npm/@actions/{http-client.dep.yml => http-client-2.0.1.dep.yml} (98%) rename .licenses/npm/@octokit/{plugin-request-log.dep.yml => openapi-types.dep.yml} (72%) rename .licenses/npm/@octokit/{plugin-rest-endpoint-methods-4.1.1.dep.yml => plugin-rest-endpoint-methods.dep.yml} (98%) delete mode 100644 .licenses/npm/@types/node.dep.yml create mode 100644 .licenses/npm/lodash.deburr.dep.yml create mode 100644 .licenses/npm/lru-cache.dep.yml create mode 100644 .licenses/npm/tr46.dep.yml rename .licenses/npm/{@octokit/plugin-rest-endpoint-methods-4.1.2.dep.yml => uuid.dep.yml} (65%) create mode 100644 .licenses/npm/webidl-conversions.dep.yml rename .licenses/npm/{@octokit/rest.dep.yml => whatwg-url.dep.yml} (77%) create mode 100644 .licenses/npm/yallist.dep.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index ec4bb386b..3ba13e0ce 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1 +1 @@ -blank_issues_enabled: false \ No newline at end of file +blank_issues_enabled: false diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f317ce66b..4fa07c3b7 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -32,7 +32,7 @@ jobs: - name: Format, lint, build and test run: npm run all:ci - + dry-run-test: # make sure the action works on a clean machine without building runs-on: ubuntu-latest steps: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 420182856..716eb8fbb 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,9 +2,9 @@ name: 'Code scanning' on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] schedule: - cron: '23 19 * * 0' @@ -18,7 +18,7 @@ jobs: - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: - languages: "javascript" + languages: 'javascript' - name: Autobuild uses: github/codeql-action/autobuild@v2 diff --git a/.github/workflows/licensed.yml b/.github/workflows/licensed.yml index 867af6e97..4d9089678 100644 --- a/.github/workflows/licensed.yml +++ b/.github/workflows/licensed.yml @@ -22,4 +22,4 @@ jobs: curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.9.0/licensed-3.9.0-linux-x64.tar.gz sudo tar -xzf licensed.tar.gz sudo mv licensed /usr/local/bin/licensed - - run: licensed status \ No newline at end of file + - run: licensed status diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release-new-action-version.yml index c5c4bdfcd..e6ced8304 100644 --- a/.github/workflows/release-new-action-version.yml +++ b/.github/workflows/release-new-action-version.yml @@ -20,9 +20,9 @@ jobs: name: releaseNewActionVersion runs-on: ubuntu-latest steps: - - name: Update the ${{ env.TAG_NAME }} tag - id: update-major-tag - uses: actions/publish-action@v0.2.1 - with: - source-tag: ${{ env.TAG_NAME }} - slack-webhook: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file + - name: Update the ${{ env.TAG_NAME }} tag + id: update-major-tag + uses: actions/publish-action@v0.2.1 + with: + source-tag: ${{ env.TAG_NAME }} + slack-webhook: ${{ secrets.SLACK_WEBHOOK }} diff --git a/.licenses/npm/@actions/core.dep.yml b/.licenses/npm/@actions/core.dep.yml index 6fe946d3e..b468d55dd 100644 --- a/.licenses/npm/@actions/core.dep.yml +++ b/.licenses/npm/@actions/core.dep.yml @@ -1,6 +1,6 @@ --- name: "@actions/core" -version: 1.2.4 +version: 1.10.0 type: npm summary: Actions core lib homepage: https://github.com/actions/toolkit/tree/master/packages/core diff --git a/.licenses/npm/@actions/github.dep.yml b/.licenses/npm/@actions/github.dep.yml index 0569b7478..ca2f2b981 100644 --- a/.licenses/npm/@actions/github.dep.yml +++ b/.licenses/npm/@actions/github.dep.yml @@ -1,6 +1,6 @@ --- name: "@actions/github" -version: 4.0.0 +version: 5.0.1 type: npm summary: Actions github lib homepage: https://github.com/actions/toolkit/tree/master/packages/github diff --git a/.licenses/npm/@actions/http-client-1.0.11.dep.yml b/.licenses/npm/@actions/http-client-1.0.11.dep.yml new file mode 100644 index 000000000..43316cbc6 --- /dev/null +++ b/.licenses/npm/@actions/http-client-1.0.11.dep.yml @@ -0,0 +1,32 @@ +--- +name: "@actions/http-client" +version: 1.0.11 +type: npm +summary: Actions Http Client +homepage: https://github.com/actions/http-client#readme +license: mit +licenses: +- sources: LICENSE + text: | + Actions Http Client for Node.js + + Copyright (c) GitHub, Inc. + + All rights reserved. + + MIT License + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +notices: [] diff --git a/.licenses/npm/@actions/http-client.dep.yml b/.licenses/npm/@actions/http-client-2.0.1.dep.yml similarity index 98% rename from .licenses/npm/@actions/http-client.dep.yml rename to .licenses/npm/@actions/http-client-2.0.1.dep.yml index d18a24ff9..88e4e6630 100644 --- a/.licenses/npm/@actions/http-client.dep.yml +++ b/.licenses/npm/@actions/http-client-2.0.1.dep.yml @@ -1,6 +1,6 @@ --- name: "@actions/http-client" -version: 1.0.8 +version: 2.0.1 type: npm summary: Actions Http Client homepage: https://github.com/actions/http-client#readme diff --git a/.licenses/npm/@octokit/auth-token.dep.yml b/.licenses/npm/@octokit/auth-token.dep.yml index b54dd4b33..8b32978b3 100644 --- a/.licenses/npm/@octokit/auth-token.dep.yml +++ b/.licenses/npm/@octokit/auth-token.dep.yml @@ -1,6 +1,6 @@ --- name: "@octokit/auth-token" -version: 2.4.2 +version: 2.5.0 type: npm summary: GitHub API token authentication for browsers and Node.js homepage: https://github.com/octokit/auth-token.js#readme diff --git a/.licenses/npm/@octokit/core.dep.yml b/.licenses/npm/@octokit/core.dep.yml index ecde798a8..66c234f57 100644 --- a/.licenses/npm/@octokit/core.dep.yml +++ b/.licenses/npm/@octokit/core.dep.yml @@ -1,6 +1,6 @@ --- name: "@octokit/core" -version: 3.1.1 +version: 3.6.0 type: npm summary: Extendable client for GitHub's REST & GraphQL APIs homepage: https://github.com/octokit/core.js#readme diff --git a/.licenses/npm/@octokit/endpoint.dep.yml b/.licenses/npm/@octokit/endpoint.dep.yml index c35bc9a34..6e408e8fb 100644 --- a/.licenses/npm/@octokit/endpoint.dep.yml +++ b/.licenses/npm/@octokit/endpoint.dep.yml @@ -1,6 +1,6 @@ --- name: "@octokit/endpoint" -version: 6.0.5 +version: 6.0.12 type: npm summary: Turns REST API endpoints into generic request options homepage: https://github.com/octokit/endpoint.js#readme diff --git a/.licenses/npm/@octokit/graphql.dep.yml b/.licenses/npm/@octokit/graphql.dep.yml index 01d745b93..d1032a9d7 100644 --- a/.licenses/npm/@octokit/graphql.dep.yml +++ b/.licenses/npm/@octokit/graphql.dep.yml @@ -1,6 +1,6 @@ --- name: "@octokit/graphql" -version: 4.5.2 +version: 4.8.0 type: npm summary: GitHub GraphQL API client for browsers and Node homepage: https://github.com/octokit/graphql.js#readme diff --git a/.licenses/npm/@octokit/plugin-request-log.dep.yml b/.licenses/npm/@octokit/openapi-types.dep.yml similarity index 72% rename from .licenses/npm/@octokit/plugin-request-log.dep.yml rename to .licenses/npm/@octokit/openapi-types.dep.yml index 97214a626..65dc21a36 100644 --- a/.licenses/npm/@octokit/plugin-request-log.dep.yml +++ b/.licenses/npm/@octokit/openapi-types.dep.yml @@ -1,18 +1,18 @@ --- -name: "@octokit/plugin-request-log" -version: 1.0.0 +name: "@octokit/openapi-types" +version: 11.2.0 type: npm -summary: Log all requests and request errors -homepage: https://github.com/octokit/plugin-request-log.js#readme +summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com +homepage: license: mit licenses: - sources: LICENSE - text: | - MIT License Copyright (c) 2020 Octokit contributors + text: |- + Copyright 2020 Gregor Martynus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - sources: README.md diff --git a/.licenses/npm/@octokit/plugin-paginate-rest.dep.yml b/.licenses/npm/@octokit/plugin-paginate-rest.dep.yml index bfb202ec3..3978f5829 100644 --- a/.licenses/npm/@octokit/plugin-paginate-rest.dep.yml +++ b/.licenses/npm/@octokit/plugin-paginate-rest.dep.yml @@ -1,6 +1,6 @@ --- name: "@octokit/plugin-paginate-rest" -version: 2.2.4 +version: 2.17.0 type: npm summary: Octokit plugin to paginate REST API endpoint responses homepage: https://github.com/octokit/plugin-paginate-rest.js#readme diff --git a/.licenses/npm/@octokit/plugin-rest-endpoint-methods-4.1.1.dep.yml b/.licenses/npm/@octokit/plugin-rest-endpoint-methods.dep.yml similarity index 98% rename from .licenses/npm/@octokit/plugin-rest-endpoint-methods-4.1.1.dep.yml rename to .licenses/npm/@octokit/plugin-rest-endpoint-methods.dep.yml index 9da3b8eae..3d45df2f0 100644 --- a/.licenses/npm/@octokit/plugin-rest-endpoint-methods-4.1.1.dep.yml +++ b/.licenses/npm/@octokit/plugin-rest-endpoint-methods.dep.yml @@ -1,6 +1,6 @@ --- name: "@octokit/plugin-rest-endpoint-methods" -version: 4.1.1 +version: 5.13.0 type: npm summary: Octokit plugin adding one method for all of api.github.com REST API endpoints homepage: https://github.com/octokit/plugin-rest-endpoint-methods.js#readme diff --git a/.licenses/npm/@octokit/request-error.dep.yml b/.licenses/npm/@octokit/request-error.dep.yml index 71f3b2abd..c93891696 100644 --- a/.licenses/npm/@octokit/request-error.dep.yml +++ b/.licenses/npm/@octokit/request-error.dep.yml @@ -1,6 +1,6 @@ --- name: "@octokit/request-error" -version: 2.0.2 +version: 2.1.0 type: npm summary: Error class for Octokit request errors homepage: https://github.com/octokit/request-error.js#readme diff --git a/.licenses/npm/@octokit/request.dep.yml b/.licenses/npm/@octokit/request.dep.yml index 8078c9613..51482f35c 100644 --- a/.licenses/npm/@octokit/request.dep.yml +++ b/.licenses/npm/@octokit/request.dep.yml @@ -1,6 +1,6 @@ --- name: "@octokit/request" -version: 5.4.7 +version: 5.6.3 type: npm summary: Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node diff --git a/.licenses/npm/@octokit/types.dep.yml b/.licenses/npm/@octokit/types.dep.yml index da4090946..7a8fb3bc3 100644 --- a/.licenses/npm/@octokit/types.dep.yml +++ b/.licenses/npm/@octokit/types.dep.yml @@ -1,6 +1,6 @@ --- name: "@octokit/types" -version: 5.1.2 +version: 6.34.0 type: npm summary: Shared TypeScript definitions for Octokit projects homepage: https://github.com/octokit/types.ts#readme diff --git a/.licenses/npm/@types/node.dep.yml b/.licenses/npm/@types/node.dep.yml deleted file mode 100644 index ad67d7670..000000000 --- a/.licenses/npm/@types/node.dep.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: "@types/node" -version: 14.6.0 -type: npm -summary: TypeScript definitions for Node.js -homepage: https://github.com/DefinitelyTyped/DefinitelyTyped#readme -license: mit -licenses: -- sources: LICENSE - text: |2 - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE -notices: [] diff --git a/.licenses/npm/before-after-hook.dep.yml b/.licenses/npm/before-after-hook.dep.yml index 440fd2fa7..cebe6fdf3 100644 --- a/.licenses/npm/before-after-hook.dep.yml +++ b/.licenses/npm/before-after-hook.dep.yml @@ -1,6 +1,6 @@ --- name: before-after-hook -version: 2.1.0 +version: 2.2.2 type: npm summary: asynchronous before/error/after hooks for internal functionality homepage: https://github.com/gr2m/before-after-hook#readme diff --git a/.licenses/npm/is-plain-object.dep.yml b/.licenses/npm/is-plain-object.dep.yml index c9f1523f8..671ba2054 100644 --- a/.licenses/npm/is-plain-object.dep.yml +++ b/.licenses/npm/is-plain-object.dep.yml @@ -1,6 +1,6 @@ --- name: is-plain-object -version: 4.1.1 +version: 5.0.0 type: npm summary: Returns true if an object was created by the `Object` constructor, or Object.create(null). homepage: https://github.com/jonschlinkert/is-plain-object diff --git a/.licenses/npm/lodash.deburr.dep.yml b/.licenses/npm/lodash.deburr.dep.yml new file mode 100644 index 000000000..53ec9cf40 --- /dev/null +++ b/.licenses/npm/lodash.deburr.dep.yml @@ -0,0 +1,58 @@ +--- +name: lodash.deburr +version: 4.1.0 +type: npm +summary: The lodash method `_.deburr` exported as a module. +homepage: https://lodash.com/ +license: mit +licenses: +- sources: LICENSE + text: | + Copyright jQuery Foundation and other contributors + + Based on Underscore.js, copyright Jeremy Ashkenas, + DocumentCloud and Investigative Reporters & Editors + + This software consists of voluntary contributions made by many + individuals. For exact contribution history, see the revision history + available at https://github.com/lodash/lodash + + The following license applies to all parts of this software except as + documented below: + + ==== + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + ==== + + Copyright and related rights for sample code are waived via CC0. Sample + code is defined as all source code displayed within the prose of the + documentation. + + CC0: http://creativecommons.org/publicdomain/zero/1.0/ + + ==== + + Files located in the node_modules and vendor directories are externally + maintained libraries used by this software which have their own + licenses; we recommend you read them, as their terms may differ from the + terms above. +notices: [] diff --git a/.licenses/npm/lru-cache.dep.yml b/.licenses/npm/lru-cache.dep.yml new file mode 100644 index 000000000..8571c1a30 --- /dev/null +++ b/.licenses/npm/lru-cache.dep.yml @@ -0,0 +1,26 @@ +--- +name: lru-cache +version: 6.0.0 +type: npm +summary: A cache object that deletes the least-recently-used items. +homepage: +license: isc +licenses: +- sources: LICENSE + text: | + The ISC License + + Copyright (c) Isaac Z. Schlueter and Contributors + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +notices: [] diff --git a/.licenses/npm/node-fetch.dep.yml b/.licenses/npm/node-fetch.dep.yml index 109c6d07b..b49a78a11 100644 --- a/.licenses/npm/node-fetch.dep.yml +++ b/.licenses/npm/node-fetch.dep.yml @@ -1,6 +1,6 @@ --- name: node-fetch -version: 2.6.0 +version: 2.6.7 type: npm summary: A light-weight module that brings window.fetch to node.js homepage: https://github.com/bitinn/node-fetch @@ -42,6 +42,10 @@ licenses: [codecov-url]: https://codecov.io/gh/bitinn/node-fetch [install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch [install-size-url]: https://packagephobia.now.sh/result?p=node-fetch + [discord-image]: https://img.shields.io/discord/619915844268326952?color=%237289DA&label=Discord&style=flat-square + [discord-url]: https://discord.gg/Zxbndcm + [opencollective-image]: https://opencollective.com/node-fetch/backers.svg + [opencollective-url]: https://opencollective.com/node-fetch [whatwg-fetch]: https://fetch.spec.whatwg.org/ [response-init]: https://fetch.spec.whatwg.org/#responseinit [node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams diff --git a/.licenses/npm/semver.dep.yml b/.licenses/npm/semver.dep.yml index e1c0eae97..d172c6649 100644 --- a/.licenses/npm/semver.dep.yml +++ b/.licenses/npm/semver.dep.yml @@ -1,9 +1,9 @@ --- name: semver -version: 7.3.2 +version: 7.3.5 type: npm summary: The semantic version parser used by npm. -homepage: https://github.com/npm/node-semver#readme +homepage: license: isc licenses: - sources: LICENSE diff --git a/.licenses/npm/tr46.dep.yml b/.licenses/npm/tr46.dep.yml new file mode 100644 index 000000000..3bacc6ec4 --- /dev/null +++ b/.licenses/npm/tr46.dep.yml @@ -0,0 +1,30 @@ +--- +name: tr46 +version: 0.0.3 +type: npm +summary: An implementation of the Unicode TR46 spec +homepage: https://github.com/Sebmaster/tr46.js#readme +license: mit +licenses: +- sources: Auto-generated MIT license text + text: | + MIT License + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/npm/@octokit/plugin-rest-endpoint-methods-4.1.2.dep.yml b/.licenses/npm/uuid.dep.yml similarity index 65% rename from .licenses/npm/@octokit/plugin-rest-endpoint-methods-4.1.2.dep.yml rename to .licenses/npm/uuid.dep.yml index 809e16daf..6a0f9809d 100644 --- a/.licenses/npm/@octokit/plugin-rest-endpoint-methods-4.1.2.dep.yml +++ b/.licenses/npm/uuid.dep.yml @@ -1,20 +1,20 @@ --- -name: "@octokit/plugin-rest-endpoint-methods" -version: 4.1.2 +name: uuid +version: 8.3.2 type: npm -summary: Octokit plugin adding one method for all of api.github.com REST API endpoints -homepage: https://github.com/octokit/plugin-rest-endpoint-methods.js#readme +summary: RFC4122 (v1, v4, and v5) UUIDs +homepage: license: mit licenses: -- sources: LICENSE +- sources: LICENSE.md text: | - MIT License Copyright (c) 2019 Octokit contributors + The MIT License (MIT) + + Copyright (c) 2010-2020 Robert Kieffer and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- sources: README.md - text: "[MIT](LICENSE)" notices: [] diff --git a/.licenses/npm/webidl-conversions.dep.yml b/.licenses/npm/webidl-conversions.dep.yml new file mode 100644 index 000000000..40585680b --- /dev/null +++ b/.licenses/npm/webidl-conversions.dep.yml @@ -0,0 +1,23 @@ +--- +name: webidl-conversions +version: 3.0.1 +type: npm +summary: Implements the WebIDL algorithms for converting to and from JavaScript values +homepage: +license: bsd-2-clause +licenses: +- sources: LICENSE.md + text: | + # The BSD 2-Clause License + + Copyright (c) 2014, Domenic Denicola + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +notices: [] diff --git a/.licenses/npm/@octokit/rest.dep.yml b/.licenses/npm/whatwg-url.dep.yml similarity index 77% rename from .licenses/npm/@octokit/rest.dep.yml rename to .licenses/npm/whatwg-url.dep.yml index b17f8363c..ac3e1f6b9 100644 --- a/.licenses/npm/@octokit/rest.dep.yml +++ b/.licenses/npm/whatwg-url.dep.yml @@ -1,17 +1,16 @@ --- -name: "@octokit/rest" -version: 18.0.2 +name: whatwg-url +version: 5.0.0 type: npm -summary: GitHub REST API client for Node.js -homepage: https://github.com/octokit/rest.js#readme +summary: An implementation of the WHATWG URL Standard's URL API and parsing machinery +homepage: license: mit licenses: -- sources: LICENSE +- sources: LICENSE.txt text: | - The MIT License + The MIT License (MIT) - Copyright (c) 2012 Cloud9 IDE, Inc. (Mike de Boer) - Copyright (c) 2017-2018 Octokit contributors + Copyright (c) 2015–2016 Sebastian Mayr Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -30,6 +29,4 @@ licenses: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- sources: README.md - text: "[MIT](LICENSE)" notices: [] diff --git a/.licenses/npm/yallist.dep.yml b/.licenses/npm/yallist.dep.yml new file mode 100644 index 000000000..115c890d9 --- /dev/null +++ b/.licenses/npm/yallist.dep.yml @@ -0,0 +1,26 @@ +--- +name: yallist +version: 4.0.0 +type: npm +summary: Yet Another Linked List +homepage: +license: isc +licenses: +- sources: LICENSE + text: | + The ISC License + + Copyright (c) Isaac Z. Schlueter and Contributors + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +notices: [] From 627cef3f3764759e961ae4e0788ea732c9b92e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Reinoso=20Garc=C3=ADa?= Date: Tue, 13 Dec 2022 15:31:07 +0100 Subject: [PATCH 06/12] fix print outputs step (#859) --- .github/workflows/stale.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index a6f78c1dc..14b86b020 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -16,4 +16,4 @@ jobs: days-before-close: 5 exempt-issue-labels: 'blocked,must,should,keep' - name: Print outputs - run: echo ${{ join(steps.stale.outputs.*, ',') }} + run: echo ${{ format('{0},{1}', toJSON(steps.stale.outputs.staled-issues-prs), toJSON(steps.stale.outputs.closed-issues-prs)) }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a6ccd55d..d70fb5d5f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,4 +25,4 @@ jobs: stale-pr-message: 'This PR is stale' debug-only: true - name: Print outputs - run: echo ${{ join(steps.stale.outputs.*, ',') }} + run: echo ${{ format('{0},{1}', toJSON(steps.stale.outputs.staled-issues-prs), toJSON(steps.stale.outputs.closed-issues-prs)) }} From e36441163135a3ba5bb01c58d5a0b318023beb93 Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Wed, 14 Dec 2022 14:30:03 +0100 Subject: [PATCH 07/12] Update name of codeql.yml file --- .github/workflows/{codeql.yml => codeql-analysis.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{codeql.yml => codeql-analysis.yml} (100%) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql-analysis.yml similarity index 100% rename from .github/workflows/codeql.yml rename to .github/workflows/codeql-analysis.yml From 690ede5a62a6b047b8a7742af26dd12ad1e1e1a7 Mon Sep 17 00:00:00 2001 From: Ivan <98037481+IvanZosimov@users.noreply.github.com> Date: Wed, 14 Dec 2022 18:31:43 +0200 Subject: [PATCH 08/12] Update .github/ISSUE_TEMPLATE/bug_report.md Co-authored-by: MaksimZhukov <46996400+MaksimZhukov@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 5b6c5465f..4be1b0cf0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -14,7 +14,7 @@ assignees: '' A clear and concise description of what the bug is. **Action version:** -Specify the task version +Specify the action version **Platform:** - [ ] Ubuntu From bc357bdd1b5e8386f07a9e0417832a4b0a697076 Mon Sep 17 00:00:00 2001 From: Ivan <98037481+IvanZosimov@users.noreply.github.com> Date: Wed, 14 Dec 2022 18:32:38 +0200 Subject: [PATCH 09/12] Update .github/workflows/release-new-action-version.yml Co-authored-by: MaksimZhukov <46996400+MaksimZhukov@users.noreply.github.com> --- .github/workflows/release-new-action-version.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release-new-action-version.yml index e6ced8304..e3e12f8cc 100644 --- a/.github/workflows/release-new-action-version.yml +++ b/.github/workflows/release-new-action-version.yml @@ -21,7 +21,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Update the ${{ env.TAG_NAME }} tag - id: update-major-tag uses: actions/publish-action@v0.2.1 with: source-tag: ${{ env.TAG_NAME }} From 9c1eb3ff7e7c7198567f5c5b9cfe03b002372812 Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Wed, 14 Dec 2022 17:39:32 +0100 Subject: [PATCH 10/12] Update .md files and allign build-test.yml with the current test.yml --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/feature-request.md | 2 +- .github/workflows/build-test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 4be1b0cf0..ce0e5b29e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,7 +7,7 @@ assignees: '' --- - + **Description:** diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index a54602277..298922382 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -6,7 +6,7 @@ labels: feature request, needs triage assignees: '' --- - + **Description:** diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 4fa07c3b7..cda75dea2 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -44,4 +44,4 @@ jobs: stale-pr-message: 'This PR is stale' debug-only: true - name: Print outputs - run: echo ${{ join(steps.stale.outputs.*, ',') }} + run: echo ${{ format('{0},{1}', toJSON(steps.stale.outputs.staled-issues-prs), toJSON(steps.stale.outputs.closed-issues-prs)) }} From eed91cbd05d22d759c0f0d5ed5f7d050db69a4b3 Mon Sep 17 00:00:00 2001 From: John Sudol <24583161+johnsudol@users.noreply.github.com> Date: Tue, 20 Dec 2022 15:35:06 -0500 Subject: [PATCH 11/12] Update how stale handles exempt items (#874) --- README.md | 8 +++---- __tests__/main.spec.ts | 38 --------------------------------- dist/index.js | 13 +++++------ src/classes/issues-processor.ts | 24 ++++++++++----------- 4 files changed, 21 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index b35614e46..41de7f225 100644 --- a/README.md +++ b/README.md @@ -246,8 +246,8 @@ Required Permission: `pull-requests: write` #### exempt-issue-labels -The label(s) that can exempt to automatically mark as stale the issues. -It can be a comma separated list of labels (e.g: `question,bug`). +Comma separated list of labels that can be assigned to issues to exclude them from being marked as stale +(e.g: `question,bug`) If unset (or an empty string), this option will not alter the stale workflow. @@ -255,8 +255,8 @@ Default value: unset #### exempt-pr-labels -The label(s) that can exempt to automatically mark as stale the pull requests. -It can be a comma separated list of labels (e.g: `need-help,WIP`). +Comma separated list of labels that can be assigned to pull requests to exclude them from being marked as stale +(e.g: `need-help,WIP`) If unset (or an empty string), this option will not alter the stale workflow. diff --git a/__tests__/main.spec.ts b/__tests__/main.spec.ts index 218825471..6f752864f 100644 --- a/__tests__/main.spec.ts +++ b/__tests__/main.spec.ts @@ -1094,44 +1094,6 @@ test('exempt pr labels will not be marked stale', async () => { expect(processor.staleIssues).toHaveLength(2); // PR should get processed even though it has an exempt **issue** label }); -test('exempt issue labels will not be marked stale and will remove the existing stale label', async () => { - expect.assertions(3); - const opts = {...DefaultProcessorOptions}; - opts.exemptIssueLabels = 'Exempt'; - const TestIssueList: Issue[] = [ - generateIssue( - opts, - 1, - 'My first issue', - '2020-01-01T17:00:00Z', - '2020-01-01T17:00:00Z', - false, - ['Exempt', 'Stale'] - ) - ]; - const processor = new IssuesProcessorMock( - opts, - async p => (p === 1 ? TestIssueList : []), - async () => [ - { - user: { - login: 'notme', - type: 'User' - }, - body: 'Body' - } - ], // return a fake comment to indicate there was an update - async () => new Date().toDateString() - ); - - // process our fake issue list - await processor.processIssues(1); - - expect(processor.staleIssues.length).toStrictEqual(0); - expect(processor.closedIssues.length).toStrictEqual(0); - expect(processor.removedLabelIssues.length).toStrictEqual(1); -}); - test('stale issues should not be closed if days is set to -1', async () => { const opts = {...DefaultProcessorOptions}; opts.daysBeforeClose = -1; diff --git a/dist/index.js b/dist/index.js index 0e78fccc9..f039f498e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -523,20 +523,17 @@ class IssuesProcessor { } } if (issue.isStale) { - issueLogger.info(`This $$type has a stale label`); + issueLogger.info(`This $$type includes a stale label`); } else { - issueLogger.info(`This $$type hasn't a stale label`); + issueLogger.info(`This $$type does not include a stale label`); } const exemptLabels = words_to_list_1.wordsToList(issue.isPullRequest ? this.options.exemptPrLabels : this.options.exemptIssueLabels); - if (exemptLabels.some((exemptLabel) => is_labeled_1.isLabeled(issue, exemptLabel))) { - if (issue.isStale) { - issueLogger.info(`An exempt label was added after the stale label.`); - yield this._removeStaleLabel(issue, staleLabel); - } - issueLogger.info(`Skipping this $$type because it has an exempt label`); + const hasExemptLabel = exemptLabels.some((exemptLabel) => is_labeled_1.isLabeled(issue, exemptLabel)); + if (hasExemptLabel) { + issueLogger.info(`Skipping this $$type because it contains an exempt label, see ${issueLogger.createOptionLink(issue.isPullRequest ? option_1.Option.ExemptPrLabels : option_1.Option.ExemptIssueLabels)} for more details`); IssuesProcessor._endIssueProcessing(issue); return; // Don't process exempt issues } diff --git a/src/classes/issues-processor.ts b/src/classes/issues-processor.ts index 70e3bf242..07aff68f9 100644 --- a/src/classes/issues-processor.ts +++ b/src/classes/issues-processor.ts @@ -321,9 +321,9 @@ export class IssuesProcessor { } if (issue.isStale) { - issueLogger.info(`This $$type has a stale label`); + issueLogger.info(`This $$type includes a stale label`); } else { - issueLogger.info(`This $$type hasn't a stale label`); + issueLogger.info(`This $$type does not include a stale label`); } const exemptLabels: string[] = wordsToList( @@ -332,17 +332,16 @@ export class IssuesProcessor { : this.options.exemptIssueLabels ); - if ( - exemptLabels.some((exemptLabel: Readonly): boolean => - isLabeled(issue, exemptLabel) - ) - ) { - if (issue.isStale) { - issueLogger.info(`An exempt label was added after the stale label.`); - await this._removeStaleLabel(issue, staleLabel); - } + const hasExemptLabel = exemptLabels.some((exemptLabel: Readonly) => + isLabeled(issue, exemptLabel) + ); - issueLogger.info(`Skipping this $$type because it has an exempt label`); + if (hasExemptLabel) { + issueLogger.info( + `Skipping this $$type because it contains an exempt label, see ${issueLogger.createOptionLink( + issue.isPullRequest ? Option.ExemptPrLabels : Option.ExemptIssueLabels + )} for more details` + ); IssuesProcessor._endIssueProcessing(issue); return; // Don't process exempt issues } @@ -427,6 +426,7 @@ export class IssuesProcessor { // Determine if this issue needs to be marked stale first if (!issue.isStale) { issueLogger.info(`This $$type is not stale`); + const shouldIgnoreUpdates: boolean = new IgnoreUpdates( this.options, issue From 6f05e4244c9a0b2ed3401882b05d701dd0a7289b Mon Sep 17 00:00:00 2001 From: John Sudol <24583161+johnsudol@users.noreply.github.com> Date: Tue, 20 Dec 2022 16:09:39 -0500 Subject: [PATCH 12/12] draft release for v7.0.0 (#888) --- CHANGELOG.md | 10 ++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d69fb669..481abe220 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +# [7.0.0] + +:warning: Breaking change :warning: + +* Allow daysBeforeStale options to be float by @irega in https://github.com/actions/stale/pull/841 +* Use cache in check-dist.yml by @jongwooo in https://github.com/actions/stale/pull/876 +* fix print outputs step in existing workflows by @irega in https://github.com/actions/stale/pull/859 +* Update issue and PR templates, add/delete workflow files by @IvanZosimov in https://github.com/actions/stale/pull/880 +* Update how stale handles exempt items by @johnsudol in https://github.com/actions/stale/pull/874 + # [6.0.1] Update @actions/core to v1.10.0 ([#839](https://github.com/actions/stale/pull/839)) diff --git a/package-lock.json b/package-lock.json index 028a5f890..64150d9c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "stale-action", - "version": "2.0.0", + "version": "7.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "stale-action", - "version": "2.0.0", + "version": "7.0.0", "license": "MIT", "dependencies": { "@actions/core": "^1.10.0", diff --git a/package.json b/package.json index 6eb3685b7..7e2d925e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stale-action", - "version": "2.0.0", + "version": "7.0.0", "private": true, "description": "Marks old issues and PRs as stale", "main": "lib/main.js",