mirror of
https://github.com/actions/stale.git
synced 2025-12-23 17:08:18 +00:00
Compare commits
67 Commits
v5.0.0
...
update-cod
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65faf86995 | ||
|
|
95d18187c1 | ||
|
|
78d80e2378 | ||
|
|
b43f1bcb15 | ||
|
|
5325f2f14e | ||
|
|
6f05e4244c | ||
|
|
eed91cbd05 | ||
|
|
942bb868e3 | ||
|
|
b23acf1dc9 | ||
|
|
aab1763e57 | ||
|
|
7dfab7a600 | ||
|
|
0f49addb38 | ||
|
|
f14a81872b | ||
|
|
a19292a05f | ||
|
|
b7dd7fb519 | ||
|
|
f903b06fcc | ||
|
|
cd268b199d | ||
|
|
6d0109286a | ||
|
|
10dc265f2c | ||
|
|
9c1eb3ff7e | ||
|
|
bc357bdd1b | ||
|
|
690ede5a62 | ||
|
|
afbcabf8c3 | ||
|
|
e364411631 | ||
|
|
627cef3f37 | ||
|
|
975308fb9d | ||
|
|
97a008721c | ||
|
|
161093d861 | ||
|
|
f6a9b6accf | ||
|
|
65b52aff67 | ||
|
|
0d6f830071 | ||
|
|
b909bf8927 | ||
|
|
5ebf00ea0e | ||
|
|
3de2653986 | ||
|
|
02e44c81cc | ||
|
|
99b6c70959 | ||
|
|
8e8a0e6680 | ||
|
|
80962c1062 | ||
|
|
3e4418e47e | ||
|
|
33e37032bb | ||
|
|
97911cb595 | ||
|
|
65afee970e | ||
|
|
48bae5932f | ||
|
|
2b58cc900f | ||
|
|
532554b8a8 | ||
|
|
aaab997cce | ||
|
|
136efb520f | ||
|
|
06d2a3904b | ||
|
|
29e800e1c8 | ||
|
|
6b7f9717b7 | ||
|
|
6c298b192c | ||
|
|
c048b97ed3 | ||
|
|
71b06d0194 | ||
|
|
7bb514d8f8 | ||
|
|
a78f1809b1 | ||
|
|
e577b690d3 | ||
|
|
736a97ebc6 | ||
|
|
b9ccbf0648 | ||
|
|
69c1cc9976 | ||
|
|
8c947ce781 | ||
|
|
4b36ad56cb | ||
|
|
64112b01cc | ||
|
|
d693f556ca | ||
|
|
65d24b7092 | ||
|
|
57708ae6dd | ||
|
|
a88f7b30b9 | ||
|
|
74dfff0835 |
35
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
35
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a bug report
|
||||||
|
title: ''
|
||||||
|
labels: bug, needs triage
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--- Please direct any generic questions related to actions to our support community forum at https://github.com/orgs/community/discussions --->
|
||||||
|
<!--- Before opening up a new bug report, please make sure to check for similar existing issues -->
|
||||||
|
|
||||||
|
**Description:**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**Action version:**
|
||||||
|
Specify the action 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.
|
||||||
16
.github/ISSUE_TEMPLATE/feature-request.md
vendored
16
.github/ISSUE_TEMPLATE/feature-request.md
vendored
@@ -1,11 +1,19 @@
|
|||||||
---
|
---
|
||||||
name: Feature request
|
name: Feature request
|
||||||
about: Propose a new feature or an enhancement
|
about: Suggest an idea for this project
|
||||||
title: ''
|
title: ''
|
||||||
labels: enhancement
|
labels: feature request, needs triage
|
||||||
assignees: ''
|
assignees: ''
|
||||||
---
|
---
|
||||||
|
|
||||||
## The problem
|
<!--- Please direct any generic questions related to actions to our support community forum at https://github.com/orgs/community/discussions --->
|
||||||
|
<!--- Before opening up a new bug report, please make sure to check for similar existing issues -->
|
||||||
|
|
||||||
## The solution
|
**Description:**
|
||||||
|
Describe your proposal.
|
||||||
|
|
||||||
|
**Justification:**
|
||||||
|
Justification or a use case for your proposal.
|
||||||
|
|
||||||
|
**Are you willing to submit a PR?**
|
||||||
|
<!--- We accept contributions! -->
|
||||||
13
.github/ISSUE_TEMPLATE/other_issue_report.md
vendored
13
.github/ISSUE_TEMPLATE/other_issue_report.md
vendored
@@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
name: Other issue report
|
|
||||||
about: Report other issue
|
|
||||||
title: ''
|
|
||||||
labels: bug
|
|
||||||
assignees: ''
|
|
||||||
---
|
|
||||||
|
|
||||||
## Describe your issue
|
|
||||||
|
|
||||||
## Further context
|
|
||||||
|
|
||||||
<!-- If helpful please provide screenshots, logs, links to other related issues. -->
|
|
||||||
28
.github/ISSUE_TEMPLATE/stale_issue_report.md
vendored
28
.github/ISSUE_TEMPLATE/stale_issue_report.md
vendored
@@ -1,28 +0,0 @@
|
|||||||
---
|
|
||||||
name: Stale issue report
|
|
||||||
about: Report issues with using the stale action
|
|
||||||
title: ''
|
|
||||||
labels: bug
|
|
||||||
assignees: ''
|
|
||||||
---
|
|
||||||
|
|
||||||
<!-- Have you tried the [debugging](https://github.com/actions/stale#debugging) section of the readme? -->
|
|
||||||
|
|
||||||
## Describe your issue
|
|
||||||
|
|
||||||
## Your stale action configuration
|
|
||||||
|
|
||||||
<!-- This is an example config, please copy/paste your config into it. -->
|
|
||||||
|
|
||||||
```yml
|
|
||||||
jobs:
|
|
||||||
stale:
|
|
||||||
runs-on: ...
|
|
||||||
steps:
|
|
||||||
- uses: actions/stale@...
|
|
||||||
with: ...
|
|
||||||
```
|
|
||||||
|
|
||||||
## Further context
|
|
||||||
|
|
||||||
<!-- If helpful please provide screenshots, logs, links to other related issues. -->
|
|
||||||
9
.github/dependabot.yml
vendored
9
.github/dependabot.yml
vendored
@@ -4,6 +4,11 @@ updates:
|
|||||||
- package-ecosystem: 'npm'
|
- package-ecosystem: 'npm'
|
||||||
# Look for `package.json` and `lock` files in the `root` directory
|
# Look for `package.json` and `lock` files in the `root` directory
|
||||||
directory: '/'
|
directory: '/'
|
||||||
# Check the npm registry for updates every day (weekdays)
|
# Check the npm registry for updates once a week (Monday)
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'daily'
|
interval: 'weekly'
|
||||||
|
|
||||||
|
- package-ecosystem: 'github-actions'
|
||||||
|
directory: '/'
|
||||||
|
schedule:
|
||||||
|
interval: 'weekly'
|
||||||
|
|||||||
15
.github/pull_request_template.md
vendored
15
.github/pull_request_template.md
vendored
@@ -1,10 +1,9 @@
|
|||||||
<!-- List the change(s) you're making with this PR. -->
|
**Description:**
|
||||||
|
Describe your changes.
|
||||||
|
|
||||||
## Changes
|
**Related issue:**
|
||||||
|
Add link to the related issue.
|
||||||
|
|
||||||
- [x] ...
|
**Check list:**
|
||||||
|
- [ ] Mark if documentation changes are required.
|
||||||
## Context
|
- [ ] Mark if tests were added or updated to cover the changes.
|
||||||
|
|
||||||
<!-- Explain why you're making the change(s). -->
|
|
||||||
<!-- If you're closing an issue with this PR, [link them with a keyword](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword). -->
|
|
||||||
|
|||||||
17
.github/workflows/basic-validation.yml
vendored
Normal file
17
.github/workflows/basic-validation.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
name: Basic validation
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/*
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-basic-validation:
|
||||||
|
name: Basic validation
|
||||||
|
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
|
||||||
42
.github/workflows/check-dist.yml
vendored
42
.github/workflows/check-dist.yml
vendored
@@ -1,8 +1,3 @@
|
|||||||
# `dist/index.js` is a special file in Actions.
|
|
||||||
# When you reference an action with `uses:` in a workflow,
|
|
||||||
# `index.js` is the code that will run.
|
|
||||||
# For our project, we generate this file through a build process from other source files.
|
|
||||||
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
|
|
||||||
name: Check dist/
|
name: Check dist/
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -17,37 +12,6 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-dist:
|
call-check-dist:
|
||||||
runs-on: ubuntu-latest
|
name: Check dist/
|
||||||
|
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set Node.js 16.x
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: 16.x
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Rebuild the dist/ directory
|
|
||||||
run: |
|
|
||||||
npm run build
|
|
||||||
npm run pack
|
|
||||||
|
|
||||||
- name: Compare the expected and actual dist/ directories
|
|
||||||
run: |
|
|
||||||
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
|
|
||||||
echo "Detected uncommitted changes after build. See status below:"
|
|
||||||
git diff
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
id: diff
|
|
||||||
|
|
||||||
# If index.js was different than expected, upload the expected version as an artifact
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
|
||||||
with:
|
|
||||||
name: dist
|
|
||||||
path: dist/
|
|
||||||
|
|||||||
14
.github/workflows/codeql-analysis.yml
vendored
Normal file
14
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
name: 'Code scanning'
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
schedule:
|
||||||
|
- cron: '0 3 * * 0'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-codeQL-analysis:
|
||||||
|
name: CodeQL analysis
|
||||||
|
uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main
|
||||||
25
.github/workflows/codeql.yml
vendored
25
.github/workflows/codeql.yml
vendored
@@ -1,25 +0,0 @@
|
|||||||
name: 'Code scanning'
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 19 * * 0'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
CodeQL-Build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
uses: github/codeql-action/init@v1
|
|
||||||
|
|
||||||
- name: Autobuild
|
|
||||||
uses: github/codeql-action/autobuild@v1
|
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
|
||||||
uses: github/codeql-action/analyze@v1
|
|
||||||
26
.github/workflows/e2e-tests.yml
vendored
Normal file
26
.github/workflows/e2e-tests.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: e2e tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/*
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
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 ${{ format('{0},{1}', toJSON(steps.stale.outputs.staled-issues-prs), toJSON(steps.stale.outputs.closed-issues-prs)) }}
|
||||||
20
.github/workflows/licensed.off
vendored
20
.github/workflows/licensed.off
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Licensed
|
|
||||||
|
|
||||||
on:
|
|
||||||
push: {branches: main}
|
|
||||||
pull_request: {branches: main}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Check licenses
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- run: npm ci
|
|
||||||
- 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
|
|
||||||
sudo tar -xzf licensed.tar.gz
|
|
||||||
sudo mv licensed /usr/local/bin/licensed
|
|
||||||
- run: licensed status
|
|
||||||
15
.github/workflows/licensed.yml
vendored
Normal file
15
.github/workflows/licensed.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
name: Licensed
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-licensed:
|
||||||
|
name: Licensed
|
||||||
|
uses: actions/reusable-workflows/.github/workflows/licensed.yml@main
|
||||||
28
.github/workflows/release-new-action-version.yml
vendored
Normal file
28
.github/workflows/release-new-action-version.yml
vendored
Normal file
@@ -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
|
||||||
|
uses: actions/publish-action@v0.2.1
|
||||||
|
with:
|
||||||
|
source-tag: ${{ env.TAG_NAME }}
|
||||||
|
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
||||||
19
.github/workflows/stale.yml
vendored
19
.github/workflows/stale.yml
vendored
@@ -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.*, ',') }}
|
|
||||||
28
.github/workflows/test.yml
vendored
28
.github/workflows/test.yml
vendored
@@ -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@v2
|
|
||||||
- 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@v2
|
|
||||||
- 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.*, ',') }}
|
|
||||||
2
.licenses/npm/@actions/core.dep.yml
generated
2
.licenses/npm/@actions/core.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/core"
|
name: "@actions/core"
|
||||||
version: 1.2.4
|
version: 1.10.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Actions core lib
|
summary: Actions core lib
|
||||||
homepage: https://github.com/actions/toolkit/tree/master/packages/core
|
homepage: https://github.com/actions/toolkit/tree/master/packages/core
|
||||||
|
|||||||
2
.licenses/npm/@actions/github.dep.yml
generated
2
.licenses/npm/@actions/github.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/github"
|
name: "@actions/github"
|
||||||
version: 4.0.0
|
version: 5.0.1
|
||||||
type: npm
|
type: npm
|
||||||
summary: Actions github lib
|
summary: Actions github lib
|
||||||
homepage: https://github.com/actions/toolkit/tree/master/packages/github
|
homepage: https://github.com/actions/toolkit/tree/master/packages/github
|
||||||
|
|||||||
32
.licenses/npm/@actions/http-client-1.0.11.dep.yml
generated
Normal file
32
.licenses/npm/@actions/http-client-1.0.11.dep.yml
generated
Normal file
@@ -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: []
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/http-client"
|
name: "@actions/http-client"
|
||||||
version: 1.0.8
|
version: 2.0.1
|
||||||
type: npm
|
type: npm
|
||||||
summary: Actions Http Client
|
summary: Actions Http Client
|
||||||
homepage: https://github.com/actions/http-client#readme
|
homepage: https://github.com/actions/http-client#readme
|
||||||
2
.licenses/npm/@octokit/auth-token.dep.yml
generated
2
.licenses/npm/@octokit/auth-token.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/auth-token"
|
name: "@octokit/auth-token"
|
||||||
version: 2.4.2
|
version: 2.5.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: GitHub API token authentication for browsers and Node.js
|
summary: GitHub API token authentication for browsers and Node.js
|
||||||
homepage: https://github.com/octokit/auth-token.js#readme
|
homepage: https://github.com/octokit/auth-token.js#readme
|
||||||
|
|||||||
2
.licenses/npm/@octokit/core.dep.yml
generated
2
.licenses/npm/@octokit/core.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/core"
|
name: "@octokit/core"
|
||||||
version: 3.1.1
|
version: 3.6.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Extendable client for GitHub's REST & GraphQL APIs
|
summary: Extendable client for GitHub's REST & GraphQL APIs
|
||||||
homepage: https://github.com/octokit/core.js#readme
|
homepage: https://github.com/octokit/core.js#readme
|
||||||
|
|||||||
2
.licenses/npm/@octokit/endpoint.dep.yml
generated
2
.licenses/npm/@octokit/endpoint.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/endpoint"
|
name: "@octokit/endpoint"
|
||||||
version: 6.0.5
|
version: 6.0.12
|
||||||
type: npm
|
type: npm
|
||||||
summary: Turns REST API endpoints into generic request options
|
summary: Turns REST API endpoints into generic request options
|
||||||
homepage: https://github.com/octokit/endpoint.js#readme
|
homepage: https://github.com/octokit/endpoint.js#readme
|
||||||
|
|||||||
2
.licenses/npm/@octokit/graphql.dep.yml
generated
2
.licenses/npm/@octokit/graphql.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/graphql"
|
name: "@octokit/graphql"
|
||||||
version: 4.5.2
|
version: 4.8.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: GitHub GraphQL API client for browsers and Node
|
summary: GitHub GraphQL API client for browsers and Node
|
||||||
homepage: https://github.com/octokit/graphql.js#readme
|
homepage: https://github.com/octokit/graphql.js#readme
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/plugin-request-log"
|
name: "@octokit/openapi-types"
|
||||||
version: 1.0.0
|
version: 11.2.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Log all requests and request errors
|
summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com
|
||||||
homepage: https://github.com/octokit/plugin-request-log.js#readme
|
homepage:
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
text: |
|
text: |-
|
||||||
MIT License Copyright (c) 2020 Octokit contributors
|
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:
|
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.
|
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
|
- sources: README.md
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/plugin-paginate-rest"
|
name: "@octokit/plugin-paginate-rest"
|
||||||
version: 2.2.4
|
version: 2.17.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Octokit plugin to paginate REST API endpoint responses
|
summary: Octokit plugin to paginate REST API endpoint responses
|
||||||
homepage: https://github.com/octokit/plugin-paginate-rest.js#readme
|
homepage: https://github.com/octokit/plugin-paginate-rest.js#readme
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/plugin-rest-endpoint-methods"
|
name: "@octokit/plugin-rest-endpoint-methods"
|
||||||
version: 4.1.1
|
version: 5.13.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Octokit plugin adding one method for all of api.github.com REST API endpoints
|
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
|
homepage: https://github.com/octokit/plugin-rest-endpoint-methods.js#readme
|
||||||
2
.licenses/npm/@octokit/request-error.dep.yml
generated
2
.licenses/npm/@octokit/request-error.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/request-error"
|
name: "@octokit/request-error"
|
||||||
version: 2.0.2
|
version: 2.1.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Error class for Octokit request errors
|
summary: Error class for Octokit request errors
|
||||||
homepage: https://github.com/octokit/request-error.js#readme
|
homepage: https://github.com/octokit/request-error.js#readme
|
||||||
|
|||||||
2
.licenses/npm/@octokit/request.dep.yml
generated
2
.licenses/npm/@octokit/request.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/request"
|
name: "@octokit/request"
|
||||||
version: 5.4.7
|
version: 5.6.3
|
||||||
type: npm
|
type: npm
|
||||||
summary: Send parameterized requests to GitHub’s APIs with sensible defaults in browsers
|
summary: Send parameterized requests to GitHub’s APIs with sensible defaults in browsers
|
||||||
and Node
|
and Node
|
||||||
|
|||||||
2
.licenses/npm/@octokit/types.dep.yml
generated
2
.licenses/npm/@octokit/types.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/types"
|
name: "@octokit/types"
|
||||||
version: 5.1.2
|
version: 6.34.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Shared TypeScript definitions for Octokit projects
|
summary: Shared TypeScript definitions for Octokit projects
|
||||||
homepage: https://github.com/octokit/types.ts#readme
|
homepage: https://github.com/octokit/types.ts#readme
|
||||||
|
|||||||
32
.licenses/npm/@types/node.dep.yml
generated
32
.licenses/npm/@types/node.dep.yml
generated
@@ -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: []
|
|
||||||
2
.licenses/npm/before-after-hook.dep.yml
generated
2
.licenses/npm/before-after-hook.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: before-after-hook
|
name: before-after-hook
|
||||||
version: 2.1.0
|
version: 2.2.2
|
||||||
type: npm
|
type: npm
|
||||||
summary: asynchronous before/error/after hooks for internal functionality
|
summary: asynchronous before/error/after hooks for internal functionality
|
||||||
homepage: https://github.com/gr2m/before-after-hook#readme
|
homepage: https://github.com/gr2m/before-after-hook#readme
|
||||||
|
|||||||
2
.licenses/npm/is-plain-object.dep.yml
generated
2
.licenses/npm/is-plain-object.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: is-plain-object
|
name: is-plain-object
|
||||||
version: 4.1.1
|
version: 5.0.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Returns true if an object was created by the `Object` constructor, or Object.create(null).
|
summary: Returns true if an object was created by the `Object` constructor, or Object.create(null).
|
||||||
homepage: https://github.com/jonschlinkert/is-plain-object
|
homepage: https://github.com/jonschlinkert/is-plain-object
|
||||||
|
|||||||
58
.licenses/npm/lodash.deburr.dep.yml
generated
Normal file
58
.licenses/npm/lodash.deburr.dep.yml
generated
Normal file
@@ -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 <https://jquery.org/>
|
||||||
|
|
||||||
|
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||||
|
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||||
|
|
||||||
|
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: []
|
||||||
26
.licenses/npm/lru-cache.dep.yml
generated
Normal file
26
.licenses/npm/lru-cache.dep.yml
generated
Normal file
@@ -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: []
|
||||||
6
.licenses/npm/node-fetch.dep.yml
generated
6
.licenses/npm/node-fetch.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: node-fetch
|
name: node-fetch
|
||||||
version: 2.6.0
|
version: 2.6.7
|
||||||
type: npm
|
type: npm
|
||||||
summary: A light-weight module that brings window.fetch to node.js
|
summary: A light-weight module that brings window.fetch to node.js
|
||||||
homepage: https://github.com/bitinn/node-fetch
|
homepage: https://github.com/bitinn/node-fetch
|
||||||
@@ -42,6 +42,10 @@ licenses:
|
|||||||
[codecov-url]: https://codecov.io/gh/bitinn/node-fetch
|
[codecov-url]: https://codecov.io/gh/bitinn/node-fetch
|
||||||
[install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch
|
[install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch
|
||||||
[install-size-url]: https://packagephobia.now.sh/result?p=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/
|
[whatwg-fetch]: https://fetch.spec.whatwg.org/
|
||||||
[response-init]: https://fetch.spec.whatwg.org/#responseinit
|
[response-init]: https://fetch.spec.whatwg.org/#responseinit
|
||||||
[node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams
|
[node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams
|
||||||
|
|||||||
4
.licenses/npm/semver.dep.yml
generated
4
.licenses/npm/semver.dep.yml
generated
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: semver
|
name: semver
|
||||||
version: 7.3.2
|
version: 7.3.5
|
||||||
type: npm
|
type: npm
|
||||||
summary: The semantic version parser used by npm.
|
summary: The semantic version parser used by npm.
|
||||||
homepage: https://github.com/npm/node-semver#readme
|
homepage:
|
||||||
license: isc
|
license: isc
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
|||||||
30
.licenses/npm/tr46.dep.yml
generated
Normal file
30
.licenses/npm/tr46.dep.yml
generated
Normal file
@@ -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: []
|
||||||
@@ -1,20 +1,20 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/plugin-rest-endpoint-methods"
|
name: uuid
|
||||||
version: 4.1.2
|
version: 8.3.2
|
||||||
type: npm
|
type: npm
|
||||||
summary: Octokit plugin adding one method for all of api.github.com REST API endpoints
|
summary: RFC4122 (v1, v4, and v5) UUIDs
|
||||||
homepage: https://github.com/octokit/plugin-rest-endpoint-methods.js#readme
|
homepage:
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE.md
|
||||||
text: |
|
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:
|
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.
|
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: []
|
notices: []
|
||||||
23
.licenses/npm/webidl-conversions.dep.yml
generated
Normal file
23
.licenses/npm/webidl-conversions.dep.yml
generated
Normal file
@@ -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: []
|
||||||
@@ -1,17 +1,16 @@
|
|||||||
---
|
---
|
||||||
name: "@octokit/rest"
|
name: whatwg-url
|
||||||
version: 18.0.2
|
version: 5.0.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: GitHub REST API client for Node.js
|
summary: An implementation of the WHATWG URL Standard's URL API and parsing machinery
|
||||||
homepage: https://github.com/octokit/rest.js#readme
|
homepage:
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE.txt
|
||||||
text: |
|
text: |
|
||||||
The MIT License
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2012 Cloud9 IDE, Inc. (Mike de Boer)
|
Copyright (c) 2015–2016 Sebastian Mayr
|
||||||
Copyright (c) 2017-2018 Octokit contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
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,
|
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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
- sources: README.md
|
|
||||||
text: "[MIT](LICENSE)"
|
|
||||||
notices: []
|
notices: []
|
||||||
26
.licenses/npm/yallist.dep.yml
generated
Normal file
26
.licenses/npm/yallist.dep.yml
generated
Normal file
@@ -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: []
|
||||||
29
CHANGELOG.md
29
CHANGELOG.md
@@ -1,11 +1,36 @@
|
|||||||
# Changelog
|
# 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))
|
||||||
|
|
||||||
|
# [6.0.0]
|
||||||
|
|
||||||
|
:warning: Breaking change :warning:
|
||||||
|
|
||||||
|
Issues/PRs default `close-issue-reason` is now `not_planned`([#789](https://github.com/actions/stale/issues/789))
|
||||||
|
|
||||||
|
# [5.1.0]
|
||||||
|
|
||||||
|
[Don't process stale issues right after they're marked stale](https://github.com/actions/stale/issues/696)
|
||||||
|
[Add close-issue-reason option][#764](https://github.com/actions/stale/pull/764)[#772](https://github.com/actions/stale/pull/772)
|
||||||
|
Various dependabot/dependency updates
|
||||||
|
|
||||||
## [4.1.0](https://github.com/actions/stale/compare/v3.0.19...v4.1.0) (2021-07-14)
|
## [4.1.0](https://github.com/actions/stale/compare/v3.0.19...v4.1.0) (2021-07-14)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- [Ability to exempt draft PRs](https://github.com/actions/stale/commit/9912fa74d1c01b5d6187793d97441019cbe325d0
|
- [Ability to exempt draft PRs](https://github.com/actions/stale/commit/9912fa74d1c01b5d6187793d97441019cbe325d0)
|
||||||
)
|
|
||||||
|
|
||||||
## [4.0.0](https://github.com/actions/stale/compare/v3.0.19...v4.0.0) (2021-07-14)
|
## [4.0.0](https://github.com/actions/stale/compare/v3.0.19...v4.0.0) (2021-07-14)
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
* @actions/actions-runtime
|
* @actions/setup-actions-team
|
||||||
|
|||||||
@@ -46,6 +46,13 @@ Build, lint, package and test everything.
|
|||||||
$ npm run all
|
$ npm run all
|
||||||
```
|
```
|
||||||
|
|
||||||
|
IMPORTANT:
|
||||||
|
Be sure to commit the result of:
|
||||||
|
```bash
|
||||||
|
$ npm run pack
|
||||||
|
```
|
||||||
|
Otherwise PR checks will fail.
|
||||||
|
|
||||||
# Release
|
# Release
|
||||||
|
|
||||||
Based on [standard-version](https://github.com/conventional-changelog/standard-version).
|
Based on [standard-version](https://github.com/conventional-changelog/standard-version).
|
||||||
|
|||||||
49
README.md
49
README.md
@@ -11,11 +11,12 @@ The configuration must be on the default branch and the default values will:
|
|||||||
## Recommended permissions
|
## Recommended permissions
|
||||||
|
|
||||||
For the execution of this action, it must be able to fetch all issues and pull requests from your repository.
|
For the execution of this action, it must be able to fetch all issues and pull requests from your repository.
|
||||||
In addition, based on the provided configuration, the action could require more permission(s) (e.g.: add label, remove label, comment, close, etc.).
|
In addition, based on the provided configuration, the action could require more permission(s) (e.g.: add label, remove label, comment, close, delete branch, etc.).
|
||||||
This can be achieved with the following [configuration in the action](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions) if the permissions are restricted:
|
This can be achieved with the following [configuration in the action](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions) if the permissions are restricted:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
permissions:
|
permissions:
|
||||||
|
contents: write # only for delete-branch option
|
||||||
issues: write
|
issues: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
```
|
```
|
||||||
@@ -43,6 +44,7 @@ Every argument is optional.
|
|||||||
| [close-pr-message](#close-pr-message) | Comment on the staled PRs while closed | |
|
| [close-pr-message](#close-pr-message) | Comment on the staled PRs while closed | |
|
||||||
| [stale-issue-label](#stale-issue-label) | Label to apply on staled issues | `Stale` |
|
| [stale-issue-label](#stale-issue-label) | Label to apply on staled issues | `Stale` |
|
||||||
| [close-issue-label](#close-issue-label) | Label to apply on closed issues | |
|
| [close-issue-label](#close-issue-label) | Label to apply on closed issues | |
|
||||||
|
| [close-issue-reason](#close-issue-reason) | Reason to use when closing issues | `not_planned` |
|
||||||
| [stale-pr-label](#stale-pr-label) | Label to apply on staled PRs | `Stale` |
|
| [stale-pr-label](#stale-pr-label) | Label to apply on staled PRs | `Stale` |
|
||||||
| [close-pr-label](#close-pr-label) | Label to apply on closed PRs | |
|
| [close-pr-label](#close-pr-label) | Label to apply on closed PRs | |
|
||||||
| [exempt-issue-labels](#exempt-issue-labels) | Labels on issues exempted from stale | |
|
| [exempt-issue-labels](#exempt-issue-labels) | Labels on issues exempted from stale | |
|
||||||
@@ -80,6 +82,7 @@ Every argument is optional.
|
|||||||
| [ignore-updates](#ignore-updates) | Any update (update/comment) can reset the stale idle time on the issues/PRs | `false` |
|
| [ignore-updates](#ignore-updates) | Any update (update/comment) can reset the stale idle time on the issues/PRs | `false` |
|
||||||
| [ignore-issue-updates](#ignore-issue-updates) | Override [ignore-updates](#ignore-updates) for issues only | |
|
| [ignore-issue-updates](#ignore-issue-updates) | Override [ignore-updates](#ignore-updates) for issues only | |
|
||||||
| [ignore-pr-updates](#ignore-pr-updates) | Override [ignore-updates](#ignore-updates) for PRs only | |
|
| [ignore-pr-updates](#ignore-pr-updates) | Override [ignore-updates](#ignore-updates) for PRs only | |
|
||||||
|
| [include-only-assigned](#include-only-assigned) | Process only assigned issues | `false` |
|
||||||
|
|
||||||
### List of output options
|
### List of output options
|
||||||
|
|
||||||
@@ -219,6 +222,12 @@ It will be automatically removed if the issues are no longer closed nor locked.
|
|||||||
Default value: unset
|
Default value: unset
|
||||||
Required Permission: `issues: write`
|
Required Permission: `issues: write`
|
||||||
|
|
||||||
|
#### close-issue-reason
|
||||||
|
|
||||||
|
Specify the [reason](https://github.blog/changelog/2022-05-19-the-new-github-issues-may-19th-update/) used when closing issues. Valid values are `completed` and `not_planned`.
|
||||||
|
|
||||||
|
Default value: `not_planned`
|
||||||
|
|
||||||
#### stale-pr-label
|
#### stale-pr-label
|
||||||
|
|
||||||
The label that will be added to the pull requests when automatically marked as stale.
|
The label that will be added to the pull requests when automatically marked as stale.
|
||||||
@@ -237,8 +246,8 @@ Required Permission: `pull-requests: write`
|
|||||||
|
|
||||||
#### exempt-issue-labels
|
#### exempt-issue-labels
|
||||||
|
|
||||||
The label(s) that can exempt to automatically mark as stale the issues.
|
Comma separated list of labels that can be assigned to issues to exclude them from being marked as stale
|
||||||
It can be a comma separated list of labels (e.g: `question,bug`).
|
(e.g: `question,bug`)
|
||||||
|
|
||||||
If unset (or an empty string), this option will not alter the stale workflow.
|
If unset (or an empty string), this option will not alter the stale workflow.
|
||||||
|
|
||||||
@@ -246,8 +255,8 @@ Default value: unset
|
|||||||
|
|
||||||
#### exempt-pr-labels
|
#### exempt-pr-labels
|
||||||
|
|
||||||
The label(s) that can exempt to automatically mark as stale the pull requests.
|
Comma separated list of labels that can be assigned to pull requests to exclude them from being marked as stale
|
||||||
It can be a comma separated list of labels (e.g: `need-help,WIP`).
|
(e.g: `need-help,WIP`)
|
||||||
|
|
||||||
If unset (or an empty string), this option will not alter the stale workflow.
|
If unset (or an empty string), this option will not alter the stale workflow.
|
||||||
|
|
||||||
@@ -389,7 +398,7 @@ Default value: unset
|
|||||||
If set to `true`, the stale workflow will automatically delete the GitHub branches related to the pull requests automatically closed by the stale workflow.
|
If set to `true`, the stale workflow will automatically delete the GitHub branches related to the pull requests automatically closed by the stale workflow.
|
||||||
|
|
||||||
Default value: `false`
|
Default value: `false`
|
||||||
Required Permission: `pull-requests: write`
|
Required Permission: `pull-requests: write` and `contents: write`
|
||||||
|
|
||||||
#### exempt-milestones
|
#### exempt-milestones
|
||||||
|
|
||||||
@@ -509,6 +518,12 @@ Useful to override [ignore-updates](#ignore-updates) but only to ignore the upda
|
|||||||
|
|
||||||
Default value: unset
|
Default value: unset
|
||||||
|
|
||||||
|
#### include-only-assigned
|
||||||
|
|
||||||
|
If set to `true`, only the issues or the pull requests with an assignee will be marked as stale automatically.
|
||||||
|
|
||||||
|
Default value: `false`
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
See also [action.yml](./action.yml) for a comprehensive list of all the options.
|
See also [action.yml](./action.yml) for a comprehensive list of all the options.
|
||||||
@@ -525,7 +540,7 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v4
|
- uses: actions/stale@v6
|
||||||
with:
|
with:
|
||||||
stale-issue-message: 'Message to comment on stale issues. If none provided, will not mark issues stale'
|
stale-issue-message: 'Message to comment on stale issues. If none provided, will not mark issues stale'
|
||||||
stale-pr-message: 'Message to comment on stale PRs. If none provided, will not mark PRs stale'
|
stale-pr-message: 'Message to comment on stale PRs. If none provided, will not mark PRs stale'
|
||||||
@@ -543,7 +558,7 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v4
|
- uses: actions/stale@v6
|
||||||
with:
|
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.'
|
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-stale: 30
|
||||||
@@ -562,7 +577,7 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v4
|
- uses: actions/stale@v6
|
||||||
with:
|
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.'
|
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.'
|
||||||
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
|
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
|
||||||
@@ -584,7 +599,7 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v4
|
- uses: actions/stale@v6
|
||||||
with:
|
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.'
|
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.'
|
||||||
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
|
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
|
||||||
@@ -608,7 +623,7 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v4
|
- uses: actions/stale@v6
|
||||||
with:
|
with:
|
||||||
stale-issue-message: 'Stale issue message'
|
stale-issue-message: 'Stale issue message'
|
||||||
stale-pr-message: 'Stale pull request message'
|
stale-pr-message: 'Stale pull request message'
|
||||||
@@ -631,7 +646,7 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v4
|
- uses: actions/stale@v6
|
||||||
with:
|
with:
|
||||||
start-date: '2020-04-18T00:00:00Z' # ISO 8601 or RFC 2822
|
start-date: '2020-04-18T00:00:00Z' # ISO 8601 or RFC 2822
|
||||||
```
|
```
|
||||||
@@ -648,7 +663,7 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v4
|
- uses: actions/stale@v6
|
||||||
with:
|
with:
|
||||||
exempt-issue-milestones: 'future,alpha,beta'
|
exempt-issue-milestones: 'future,alpha,beta'
|
||||||
exempt-pr-milestones: 'bugfix,improvement'
|
exempt-pr-milestones: 'bugfix,improvement'
|
||||||
@@ -666,7 +681,7 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v4
|
- uses: actions/stale@v6
|
||||||
with:
|
with:
|
||||||
exempt-all-pr-milestones: true
|
exempt-all-pr-milestones: true
|
||||||
```
|
```
|
||||||
@@ -683,7 +698,7 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v4
|
- uses: actions/stale@v6
|
||||||
with:
|
with:
|
||||||
any-of-labels: 'needs-more-info,needs-demo'
|
any-of-labels: 'needs-more-info,needs-demo'
|
||||||
# You can opt for 'only-labels' instead if your use-case requires all labels
|
# You can opt for 'only-labels' instead if your use-case requires all labels
|
||||||
@@ -702,7 +717,7 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v4
|
- uses: actions/stale@v6
|
||||||
with:
|
with:
|
||||||
exempt-issue-assignees: 'marco,polo'
|
exempt-issue-assignees: 'marco,polo'
|
||||||
exempt-pr-assignees: 'marco'
|
exempt-pr-assignees: 'marco'
|
||||||
@@ -720,7 +735,7 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v4
|
- uses: actions/stale@v6
|
||||||
with:
|
with:
|
||||||
exempt-all-pr-assignees: true
|
exempt-all-pr-assignees: true
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1103,7 +1103,7 @@ class IssuesProcessorBuilder {
|
|||||||
issue.updated_at ?? new Date().toDateString(),
|
issue.updated_at ?? new Date().toDateString(),
|
||||||
issue.created_at ?? new Date().toDateString(),
|
issue.created_at ?? new Date().toDateString(),
|
||||||
!!issue.pull_request,
|
!!issue.pull_request,
|
||||||
issue.labels ? issue.labels.map(label => label.name) : []
|
issue.labels ? issue.labels.map(label => label.name || '') : []
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options';
|
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options';
|
||||||
|
|
||||||
|
// Default options for use in tests.
|
||||||
|
// Mirrors the defaults defined in action.yml
|
||||||
export const DefaultProcessorOptions: IIssuesProcessorOptions = Object.freeze({
|
export const DefaultProcessorOptions: IIssuesProcessorOptions = Object.freeze({
|
||||||
repoToken: 'none',
|
repoToken: 'none',
|
||||||
staleIssueMessage: 'This issue is stale',
|
staleIssueMessage: 'This issue is stale',
|
||||||
@@ -50,5 +52,7 @@ export const DefaultProcessorOptions: IIssuesProcessorOptions = Object.freeze({
|
|||||||
ignoreUpdates: false,
|
ignoreUpdates: false,
|
||||||
ignoreIssueUpdates: undefined,
|
ignoreIssueUpdates: undefined,
|
||||||
ignorePrUpdates: undefined,
|
ignorePrUpdates: undefined,
|
||||||
exemptDraftPr: false
|
exemptDraftPr: false,
|
||||||
|
closeIssueReason: 'not_planned',
|
||||||
|
includeOnlyAssigned: false
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class IssuesProcessorBuilder {
|
|||||||
issue.updated_at ?? new Date().toDateString(),
|
issue.updated_at ?? new Date().toDateString(),
|
||||||
issue.created_at ?? new Date().toDateString(),
|
issue.created_at ?? new Date().toDateString(),
|
||||||
!!issue.pull_request,
|
!!issue.pull_request,
|
||||||
issue.labels ? issue.labels.map(label => label.name) : []
|
issue.labels ? issue.labels.map(label => label.name || '') : []
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
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 () => {
|
test('stale issues should not be closed if days is set to -1', async () => {
|
||||||
const opts = {...DefaultProcessorOptions};
|
const opts = {...DefaultProcessorOptions};
|
||||||
opts.daysBeforeClose = -1;
|
opts.daysBeforeClose = -1;
|
||||||
@@ -1998,6 +1960,84 @@ test('processing an issue opened since 2 days and with the option "daysBeforeIss
|
|||||||
expect(processor.closedIssues).toHaveLength(0);
|
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 () => {
|
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);
|
expect.assertions(2);
|
||||||
const opts: IIssuesProcessorOptions = {
|
const opts: IIssuesProcessorOptions = {
|
||||||
@@ -2097,6 +2137,105 @@ test('processing a pull request opened since 2 days and with the option "daysBef
|
|||||||
expect(processor.closedIssues).toHaveLength(0);
|
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 () => {
|
test('processing a previously closed issue with a close label will remove the close label', async () => {
|
||||||
expect.assertions(1);
|
expect.assertions(1);
|
||||||
const opts: IIssuesProcessorOptions = {
|
const opts: IIssuesProcessorOptions = {
|
||||||
@@ -2352,3 +2491,69 @@ test('processing a pull request to be stale with the "stalePrMessage" option set
|
|||||||
expect(processor.closedIssues).toHaveLength(0);
|
expect(processor.closedIssues).toHaveLength(0);
|
||||||
expect(processor.statistics?.addedPullRequestsCommentsCount).toStrictEqual(0);
|
expect(processor.statistics?.addedPullRequestsCommentsCount).toStrictEqual(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('processing an issue with the "includeOnlyAssigned" option and nonempty assignee list will stale the issue', async () => {
|
||||||
|
const issueDate = new Date();
|
||||||
|
issueDate.setDate(issueDate.getDate() - 2);
|
||||||
|
|
||||||
|
const opts: IIssuesProcessorOptions = {
|
||||||
|
...DefaultProcessorOptions,
|
||||||
|
staleIssueLabel: 'This issue is stale',
|
||||||
|
includeOnlyAssigned: true
|
||||||
|
};
|
||||||
|
|
||||||
|
const TestIssueList: Issue[] = [
|
||||||
|
generateIssue(
|
||||||
|
opts,
|
||||||
|
1,
|
||||||
|
'An issue with no label',
|
||||||
|
issueDate.toDateString(),
|
||||||
|
issueDate.toDateString(),
|
||||||
|
false,
|
||||||
|
[],
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
undefined,
|
||||||
|
['assignee1']
|
||||||
|
)
|
||||||
|
];
|
||||||
|
const processor = new IssuesProcessorMock(
|
||||||
|
opts,
|
||||||
|
async p => (p === 1 ? TestIssueList : []),
|
||||||
|
async () => [],
|
||||||
|
async () => new Date().toDateString()
|
||||||
|
);
|
||||||
|
|
||||||
|
// process our fake issue list
|
||||||
|
await processor.processIssues(1);
|
||||||
|
|
||||||
|
expect(processor.staleIssues).toHaveLength(1);
|
||||||
|
expect(processor.closedIssues).toHaveLength(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('processing an issue with the "includeOnlyAssigned" option set and no assignees will not stale the issue', async () => {
|
||||||
|
const issueDate = new Date();
|
||||||
|
issueDate.setDate(issueDate.getDate() - 2);
|
||||||
|
|
||||||
|
const opts: IIssuesProcessorOptions = {
|
||||||
|
...DefaultProcessorOptions,
|
||||||
|
staleIssueLabel: 'This issue is stale',
|
||||||
|
includeOnlyAssigned: true
|
||||||
|
};
|
||||||
|
|
||||||
|
const TestIssueList: Issue[] = [
|
||||||
|
generateIssue(opts, 1, 'An issue with no label', issueDate.toDateString())
|
||||||
|
];
|
||||||
|
const processor = new IssuesProcessorMock(
|
||||||
|
opts,
|
||||||
|
async p => (p === 1 ? TestIssueList : []),
|
||||||
|
async () => [],
|
||||||
|
async () => new Date().toDateString()
|
||||||
|
);
|
||||||
|
|
||||||
|
// process our fake issue list
|
||||||
|
await processor.processIssues(1);
|
||||||
|
|
||||||
|
expect(processor.staleIssues).toHaveLength(0);
|
||||||
|
expect(processor.closedIssues).toHaveLength(0);
|
||||||
|
});
|
||||||
|
|||||||
@@ -1103,7 +1103,7 @@ class IssuesProcessorBuilder {
|
|||||||
issue.updated_at ?? new Date().toDateString(),
|
issue.updated_at ?? new Date().toDateString(),
|
||||||
issue.created_at ?? new Date().toDateString(),
|
issue.created_at ?? new Date().toDateString(),
|
||||||
!!issue.pull_request,
|
!!issue.pull_request,
|
||||||
issue.labels ? issue.labels.map(label => label.name) : []
|
issue.labels ? issue.labels.map(label => label.name || '') : []
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -455,7 +455,7 @@ class IssuesProcessorBuilder {
|
|||||||
issue.updated_at ?? new Date().toDateString(),
|
issue.updated_at ?? new Date().toDateString(),
|
||||||
issue.created_at ?? new Date().toDateString(),
|
issue.created_at ?? new Date().toDateString(),
|
||||||
!!issue.pull_request,
|
!!issue.pull_request,
|
||||||
issue.labels ? issue.labels.map(label => label.name) : []
|
issue.labels ? issue.labels.map(label => label.name || '') : []
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,10 @@ inputs:
|
|||||||
description: 'The labels that mean an issue is exempt from being marked stale. Separate multiple labels with commas (eg. "label1,label2").'
|
description: 'The labels that mean an issue is exempt from being marked stale. Separate multiple labels with commas (eg. "label1,label2").'
|
||||||
default: ''
|
default: ''
|
||||||
required: false
|
required: false
|
||||||
|
close-issue-reason:
|
||||||
|
description: 'The reason to use when closing an issue.'
|
||||||
|
default: 'not_planned'
|
||||||
|
required: false
|
||||||
stale-pr-label:
|
stale-pr-label:
|
||||||
description: 'The label to apply when a pull request is stale.'
|
description: 'The label to apply when a pull request is stale.'
|
||||||
default: 'Stale'
|
default: 'Stale'
|
||||||
@@ -192,6 +196,10 @@ inputs:
|
|||||||
description: 'Any update (update/comment) can reset the stale idle time on the pull requests. Override "ignore-updates" option regarding only the pull requests.'
|
description: 'Any update (update/comment) can reset the stale idle time on the pull requests. Override "ignore-updates" option regarding only the pull requests.'
|
||||||
default: ''
|
default: ''
|
||||||
required: false
|
required: false
|
||||||
|
include-only-assigned:
|
||||||
|
description: 'Only the issues or the pull requests with an assignee will be marked as stale automatically.'
|
||||||
|
default: 'false'
|
||||||
|
required: false
|
||||||
outputs:
|
outputs:
|
||||||
closed-issues-prs:
|
closed-issues-prs:
|
||||||
description: 'List of all closed issues and pull requests.'
|
description: 'List of all closed issues and pull requests.'
|
||||||
|
|||||||
6054
dist/index.js
vendored
6054
dist/index.js
vendored
File diff suppressed because one or more lines are too long
11908
package-lock.json
generated
11908
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
17
package.json
17
package.json
@@ -1,24 +1,23 @@
|
|||||||
{
|
{
|
||||||
"name": "stale-action",
|
"name": "stale-action",
|
||||||
"version": "2.0.0",
|
"version": "7.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Marks old issues and PRs as stale",
|
"description": "Marks old issues and PRs as stale",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --project tsconfig.app.json",
|
"build": "tsc --project tsconfig.app.json && ncc build",
|
||||||
"format": "prettier --write --ignore-unknown **/*.{json,yml,ts}",
|
"format": "prettier --write --ignore-unknown **/*.{json,yml,ts}",
|
||||||
"format-check": "prettier --check --ignore-unknown **/*.{json,yml,ts}",
|
"format-check": "prettier --check --ignore-unknown **/*.{json,yml,ts}",
|
||||||
"lint": "eslint src/**/*.ts",
|
"lint": "eslint src/**/*.ts",
|
||||||
"lint:fix": "eslint src/**/*.ts --fix",
|
"lint:fix": "eslint src/**/*.ts --fix",
|
||||||
"lint:all": "npm run format-check && npm run lint",
|
"lint:all": "npm run format-check && npm run lint",
|
||||||
"lint:all:fix": "npm run format && npm run lint:fix",
|
"lint:all:fix": "npm run format && npm run lint:fix",
|
||||||
"pack": "ncc build",
|
"test": "jest --config ./jest.config.js",
|
||||||
"test": "jest",
|
|
||||||
"test:only-errors": "jest --reporters jest-silent-reporter --silent",
|
"test:only-errors": "jest --reporters jest-silent-reporter --silent",
|
||||||
"test:watch": "jest --watch --notify --expand",
|
"test:watch": "jest --watch --notify --expand",
|
||||||
"all": "npm run build && npm run format && npm run lint && npm run pack && npm test",
|
"all": "npm run format && npm run lint && npm run build && npm test",
|
||||||
"all:ci": "npm run build && npm run lint:all && npm run pack && npm run test:only-errors",
|
"all:ci": "npm run format && npm run lint && npm run build && npm run test:only-errors",
|
||||||
"prerelease": "npm run build && npm run pack",
|
"prerelease": "npm run build",
|
||||||
"release": "standard-version",
|
"release": "standard-version",
|
||||||
"release:dry-run": "standard-version --dry-run"
|
"release:dry-run": "standard-version --dry-run"
|
||||||
},
|
},
|
||||||
@@ -38,8 +37,8 @@
|
|||||||
"author": "GitHub",
|
"author": "GitHub",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/github": "^4.0.0",
|
"@actions/github": "^5.0.1",
|
||||||
"lodash.deburr": "^4.1.0",
|
"lodash.deburr": "^4.1.0",
|
||||||
"semver": "^7.3.5"
|
"semver": "^7.3.5"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -61,7 +61,9 @@ describe('Issue', (): void => {
|
|||||||
ignoreUpdates: false,
|
ignoreUpdates: false,
|
||||||
ignoreIssueUpdates: undefined,
|
ignoreIssueUpdates: undefined,
|
||||||
ignorePrUpdates: undefined,
|
ignorePrUpdates: undefined,
|
||||||
exemptDraftPr: false
|
exemptDraftPr: false,
|
||||||
|
closeIssueReason: '',
|
||||||
|
includeOnlyAssigned: false
|
||||||
};
|
};
|
||||||
issueInterface = {
|
issueInterface = {
|
||||||
title: 'dummy-title',
|
title: 'dummy-title',
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {isLabeled} from '../functions/is-labeled';
|
import {isLabeled} from '../functions/is-labeled';
|
||||||
import {isPullRequest} from '../functions/is-pull-request';
|
import {isPullRequest} from '../functions/is-pull-request';
|
||||||
import {Assignee} from '../interfaces/assignee';
|
import {Assignee} from '../interfaces/assignee';
|
||||||
import {IIssue} from '../interfaces/issue';
|
import {IIssue, OctokitIssue} from '../interfaces/issue';
|
||||||
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
|
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
|
||||||
import {ILabel} from '../interfaces/label';
|
import {ILabel} from '../interfaces/label';
|
||||||
import {IMilestone} from '../interfaces/milestone';
|
import {IMilestone} from '../interfaces/milestone';
|
||||||
@@ -17,28 +17,30 @@ export class Issue implements IIssue {
|
|||||||
readonly pull_request: Object | null | undefined;
|
readonly pull_request: Object | null | undefined;
|
||||||
readonly state: string | 'closed' | 'open';
|
readonly state: string | 'closed' | 'open';
|
||||||
readonly locked: boolean;
|
readonly locked: boolean;
|
||||||
readonly milestone: IMilestone | undefined;
|
readonly milestone?: IMilestone | null;
|
||||||
readonly assignees: Assignee[];
|
readonly assignees: Assignee[];
|
||||||
isStale: boolean;
|
isStale: boolean;
|
||||||
|
markedStaleThisRun: boolean;
|
||||||
operations = new Operations();
|
operations = new Operations();
|
||||||
private readonly _options: IIssuesProcessorOptions;
|
private readonly _options: IIssuesProcessorOptions;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
options: Readonly<IIssuesProcessorOptions>,
|
options: Readonly<IIssuesProcessorOptions>,
|
||||||
issue: Readonly<IIssue>
|
issue: Readonly<OctokitIssue> | Readonly<IIssue>
|
||||||
) {
|
) {
|
||||||
this._options = options;
|
this._options = options;
|
||||||
this.title = issue.title;
|
this.title = issue.title;
|
||||||
this.number = issue.number;
|
this.number = issue.number;
|
||||||
this.created_at = issue.created_at;
|
this.created_at = issue.created_at;
|
||||||
this.updated_at = issue.updated_at;
|
this.updated_at = issue.updated_at;
|
||||||
this.labels = issue.labels;
|
this.labels = mapLabels(issue.labels);
|
||||||
this.pull_request = issue.pull_request;
|
this.pull_request = issue.pull_request;
|
||||||
this.state = issue.state;
|
this.state = issue.state;
|
||||||
this.locked = issue.locked;
|
this.locked = issue.locked;
|
||||||
this.milestone = issue.milestone;
|
this.milestone = issue.milestone;
|
||||||
this.assignees = issue.assignees;
|
this.assignees = issue.assignees || [];
|
||||||
this.isStale = isLabeled(this, this.staleLabel);
|
this.isStale = isLabeled(this, this.staleLabel);
|
||||||
|
this.markedStaleThisRun = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
get isPullRequest(): boolean {
|
get isPullRequest(): boolean {
|
||||||
@@ -59,3 +61,14 @@ export class Issue implements IIssue {
|
|||||||
: this._options.staleIssueLabel;
|
: this._options.staleIssueLabel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function mapLabels(labels: (string | ILabel)[] | ILabel[]): ILabel[] {
|
||||||
|
return labels.map(label => {
|
||||||
|
if (typeof label == 'string') {
|
||||||
|
return {
|
||||||
|
name: label
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return label;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import {context, getOctokit} from '@actions/github';
|
import {context, getOctokit} from '@actions/github';
|
||||||
import {GitHub} from '@actions/github/lib/utils';
|
import {GitHub} from '@actions/github/lib/utils';
|
||||||
import {GetResponseTypeFromEndpointMethod} from '@octokit/types';
|
|
||||||
import {Option} from '../enums/option';
|
import {Option} from '../enums/option';
|
||||||
import {getHumanizedDate} from '../functions/dates/get-humanized-date';
|
import {getHumanizedDate} from '../functions/dates/get-humanized-date';
|
||||||
import {isDateMoreRecentThan} from '../functions/dates/is-date-more-recent-than';
|
import {isDateMoreRecentThan} from '../functions/dates/is-date-more-recent-than';
|
||||||
@@ -25,7 +24,7 @@ import {Milestones} from './milestones';
|
|||||||
import {StaleOperations} from './stale-operations';
|
import {StaleOperations} from './stale-operations';
|
||||||
import {Statistics} from './statistics';
|
import {Statistics} from './statistics';
|
||||||
import {LoggerService} from '../services/logger.service';
|
import {LoggerService} from '../services/logger.service';
|
||||||
import {IIssue} from '../interfaces/issue';
|
import {OctokitIssue} from '../interfaces/issue';
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* Handle processing of issues for staleness/closure.
|
* Handle processing of issues for staleness/closure.
|
||||||
@@ -114,11 +113,11 @@ export class IssuesProcessor {
|
|||||||
} else {
|
} else {
|
||||||
this._logger.info(
|
this._logger.info(
|
||||||
`${LoggerService.yellow(
|
`${LoggerService.yellow(
|
||||||
'Processing the batch of issues'
|
'Processing the batch of issues '
|
||||||
)} ${LoggerService.cyan(`#${page}`)} ${LoggerService.yellow(
|
)} ${LoggerService.cyan(`#${page}`)} ${LoggerService.yellow(
|
||||||
'containing'
|
' containing '
|
||||||
)} ${LoggerService.cyan(issues.length)} ${LoggerService.yellow(
|
)} ${LoggerService.cyan(issues.length)} ${LoggerService.yellow(
|
||||||
`issue${issues.length > 1 ? 's' : ''}...`
|
` issue${issues.length > 1 ? 's' : ''}...`
|
||||||
)}`
|
)}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -152,11 +151,11 @@ export class IssuesProcessor {
|
|||||||
);
|
);
|
||||||
this._logger.warning(
|
this._logger.warning(
|
||||||
`${LoggerService.yellowBright(
|
`${LoggerService.yellowBright(
|
||||||
'If you think that not enough issues were processed you could try to increase the quantity related to the'
|
'If you think that not enough issues were processed you could try to increase the quantity related to the '
|
||||||
)} ${this._logger.createOptionLink(
|
)} ${this._logger.createOptionLink(
|
||||||
Option.OperationsPerRun
|
Option.OperationsPerRun
|
||||||
)} ${LoggerService.yellowBright(
|
)} ${LoggerService.yellowBright(
|
||||||
'option which is currently set to'
|
' option which is currently set to '
|
||||||
)} ${LoggerService.cyan(this.options.operationsPerRun)}`
|
)} ${LoggerService.cyan(this.options.operationsPerRun)}`
|
||||||
);
|
);
|
||||||
this.statistics
|
this.statistics
|
||||||
@@ -167,9 +166,9 @@ export class IssuesProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._logger.info(
|
this._logger.info(
|
||||||
`${LoggerService.green('Batch')} ${LoggerService.cyan(
|
`${LoggerService.green('Batch ')} ${LoggerService.cyan(
|
||||||
`#${page}`
|
`#${page}`
|
||||||
)} ${LoggerService.green('processed.')}`
|
)} ${LoggerService.green(' processed.')}`
|
||||||
);
|
);
|
||||||
|
|
||||||
// Do the next batch
|
// Do the next batch
|
||||||
@@ -222,6 +221,14 @@ export class IssuesProcessor {
|
|||||||
return; // Don't process locked issues
|
return; // Don't process locked issues
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this._isIncludeOnlyAssigned(issue)) {
|
||||||
|
issueLogger.info(
|
||||||
|
`Skipping this $$type because its assignees list is empty`
|
||||||
|
);
|
||||||
|
IssuesProcessor._endIssueProcessing(issue);
|
||||||
|
return; // If the issue has an 'include-only-assigned' option set, process only issues with nonempty assignees list
|
||||||
|
}
|
||||||
|
|
||||||
const onlyLabels: string[] = wordsToList(this._getOnlyLabels(issue));
|
const onlyLabels: string[] = wordsToList(this._getOnlyLabels(issue));
|
||||||
|
|
||||||
if (onlyLabels.length > 0) {
|
if (onlyLabels.length > 0) {
|
||||||
@@ -314,9 +321,9 @@ export class IssuesProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (issue.isStale) {
|
if (issue.isStale) {
|
||||||
issueLogger.info(`This $$type has a stale label`);
|
issueLogger.info(`This $$type includes a stale label`);
|
||||||
} else {
|
} else {
|
||||||
issueLogger.info(`This $$type hasn't a stale label`);
|
issueLogger.info(`This $$type does not include a stale label`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const exemptLabels: string[] = wordsToList(
|
const exemptLabels: string[] = wordsToList(
|
||||||
@@ -325,17 +332,16 @@ export class IssuesProcessor {
|
|||||||
: this.options.exemptIssueLabels
|
: this.options.exemptIssueLabels
|
||||||
);
|
);
|
||||||
|
|
||||||
if (
|
const hasExemptLabel = exemptLabels.some((exemptLabel: Readonly<string>) =>
|
||||||
exemptLabels.some((exemptLabel: Readonly<string>): boolean =>
|
isLabeled(issue, exemptLabel)
|
||||||
isLabeled(issue, exemptLabel)
|
);
|
||||||
)
|
|
||||||
) {
|
|
||||||
if (issue.isStale) {
|
|
||||||
issueLogger.info(`An exempt label was added after the stale label.`);
|
|
||||||
await this._removeStaleLabel(issue, staleLabel);
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
IssuesProcessor._endIssueProcessing(issue);
|
||||||
return; // Don't process exempt issues
|
return; // Don't process exempt issues
|
||||||
}
|
}
|
||||||
@@ -420,6 +426,7 @@ export class IssuesProcessor {
|
|||||||
// Determine if this issue needs to be marked stale first
|
// Determine if this issue needs to be marked stale first
|
||||||
if (!issue.isStale) {
|
if (!issue.isStale) {
|
||||||
issueLogger.info(`This $$type is not stale`);
|
issueLogger.info(`This $$type is not stale`);
|
||||||
|
|
||||||
const shouldIgnoreUpdates: boolean = new IgnoreUpdates(
|
const shouldIgnoreUpdates: boolean = new IgnoreUpdates(
|
||||||
this.options,
|
this.options,
|
||||||
issue
|
issue
|
||||||
@@ -466,6 +473,7 @@ export class IssuesProcessor {
|
|||||||
);
|
);
|
||||||
await this._markStale(issue, staleMessage, staleLabel, skipMessage);
|
await this._markStale(issue, staleMessage, staleLabel, skipMessage);
|
||||||
issue.isStale = true; // This issue is now considered stale
|
issue.isStale = true; // This issue is now considered stale
|
||||||
|
issue.markedStaleThisRun = true;
|
||||||
issueLogger.info(`This $$type is now stale`);
|
issueLogger.info(`This $$type is now stale`);
|
||||||
} else {
|
} else {
|
||||||
issueLogger.info(
|
issueLogger.info(
|
||||||
@@ -517,7 +525,7 @@ export class IssuesProcessor {
|
|||||||
try {
|
try {
|
||||||
this._consumeIssueOperation(issue);
|
this._consumeIssueOperation(issue);
|
||||||
this.statistics?.incrementFetchedItemsCommentsCount();
|
this.statistics?.incrementFetchedItemsCommentsCount();
|
||||||
const comments = await this.client.issues.listComments({
|
const comments = await this.client.rest.issues.listComments({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: issue.number,
|
issue_number: issue.number,
|
||||||
@@ -532,25 +540,20 @@ export class IssuesProcessor {
|
|||||||
|
|
||||||
// grab issues from github in batches of 100
|
// grab issues from github in batches of 100
|
||||||
async getIssues(page: number): Promise<Issue[]> {
|
async getIssues(page: number): Promise<Issue[]> {
|
||||||
// generate type for response
|
|
||||||
const endpoint = this.client.issues.listForRepo;
|
|
||||||
type OctoKitIssueList = GetResponseTypeFromEndpointMethod<typeof endpoint>;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.operations.consumeOperation();
|
this.operations.consumeOperation();
|
||||||
const issueResult: OctoKitIssueList =
|
const issueResult = await this.client.rest.issues.listForRepo({
|
||||||
await this.client.issues.listForRepo({
|
owner: context.repo.owner,
|
||||||
owner: context.repo.owner,
|
repo: context.repo.repo,
|
||||||
repo: context.repo.repo,
|
state: 'open',
|
||||||
state: 'open',
|
per_page: 100,
|
||||||
per_page: 100,
|
direction: this.options.ascending ? 'asc' : 'desc',
|
||||||
direction: this.options.ascending ? 'asc' : 'desc',
|
page
|
||||||
page
|
});
|
||||||
});
|
|
||||||
this.statistics?.incrementFetchedItemsCount(issueResult.data.length);
|
this.statistics?.incrementFetchedItemsCount(issueResult.data.length);
|
||||||
|
|
||||||
return issueResult.data.map(
|
return issueResult.data.map(
|
||||||
(issue: Readonly<IIssue>): Issue => new Issue(this.options, issue)
|
(issue: Readonly<OctokitIssue>): Issue => new Issue(this.options, issue)
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this._logger.error(`Get issues for repo error: ${error.message}`);
|
this._logger.error(`Get issues for repo error: ${error.message}`);
|
||||||
@@ -570,7 +573,7 @@ export class IssuesProcessor {
|
|||||||
|
|
||||||
this._consumeIssueOperation(issue);
|
this._consumeIssueOperation(issue);
|
||||||
this.statistics?.incrementFetchedItemsEventsCount();
|
this.statistics?.incrementFetchedItemsEventsCount();
|
||||||
const options = this.client.issues.listEvents.endpoint.merge({
|
const options = this.client.rest.issues.listEvents.endpoint.merge({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
per_page: 100,
|
per_page: 100,
|
||||||
@@ -601,7 +604,7 @@ export class IssuesProcessor {
|
|||||||
this._consumeIssueOperation(issue);
|
this._consumeIssueOperation(issue);
|
||||||
this.statistics?.incrementFetchedPullRequestsCount();
|
this.statistics?.incrementFetchedPullRequestsCount();
|
||||||
|
|
||||||
const pullRequest = await this.client.pulls.get({
|
const pullRequest = await this.client.rest.pulls.get({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
pull_number: issue.number
|
pull_number: issue.number
|
||||||
@@ -630,13 +633,15 @@ export class IssuesProcessor {
|
|||||||
`$$type marked stale on: ${LoggerService.cyan(markedStaleOn)}`
|
`$$type marked stale on: ${LoggerService.cyan(markedStaleOn)}`
|
||||||
);
|
);
|
||||||
|
|
||||||
const issueHasComments: boolean = await this._hasCommentsSince(
|
const issueHasCommentsSinceStale: boolean = await this._hasCommentsSince(
|
||||||
issue,
|
issue,
|
||||||
markedStaleOn,
|
markedStaleOn,
|
||||||
staleMessage
|
staleMessage
|
||||||
);
|
);
|
||||||
issueLogger.info(
|
issueLogger.info(
|
||||||
`$$type has been commented on: ${LoggerService.cyan(issueHasComments)}`
|
`$$type has been commented on: ${LoggerService.cyan(
|
||||||
|
issueHasCommentsSinceStale
|
||||||
|
)}`
|
||||||
);
|
);
|
||||||
|
|
||||||
const daysBeforeClose: number = issue.isPullRequest
|
const daysBeforeClose: number = issue.isPullRequest
|
||||||
@@ -647,14 +652,6 @@ export class IssuesProcessor {
|
|||||||
`Days before $$type close: ${LoggerService.cyan(daysBeforeClose)}`
|
`Days before $$type close: ${LoggerService.cyan(daysBeforeClose)}`
|
||||||
);
|
);
|
||||||
|
|
||||||
const issueHasUpdate: boolean = IssuesProcessor._updatedSince(
|
|
||||||
issue.updated_at,
|
|
||||||
daysBeforeClose
|
|
||||||
);
|
|
||||||
issueLogger.info(
|
|
||||||
`$$type has been updated: ${LoggerService.cyan(issueHasUpdate)}`
|
|
||||||
);
|
|
||||||
|
|
||||||
const shouldRemoveStaleWhenUpdated: boolean =
|
const shouldRemoveStaleWhenUpdated: boolean =
|
||||||
this._shouldRemoveStaleWhenUpdated(issue);
|
this._shouldRemoveStaleWhenUpdated(issue);
|
||||||
|
|
||||||
@@ -672,10 +669,32 @@ export class IssuesProcessor {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (issue.markedStaleThisRun) {
|
||||||
|
issueLogger.info(`marked stale this run, so don't check for updates`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// The issue.updated_at and markedStaleOn are not always exactly in sync (they can be off by a second or 2)
|
||||||
|
// isDateMoreRecentThan makes sure they are not the same date within a certain tolerance (15 seconds in this case)
|
||||||
|
const issueHasUpdateSinceStale = isDateMoreRecentThan(
|
||||||
|
new Date(issue.updated_at),
|
||||||
|
new Date(markedStaleOn),
|
||||||
|
15
|
||||||
|
);
|
||||||
|
|
||||||
|
issueLogger.info(
|
||||||
|
`$$type has been updated since it was marked stale: ${LoggerService.cyan(
|
||||||
|
issueHasUpdateSinceStale
|
||||||
|
)}`
|
||||||
|
);
|
||||||
|
|
||||||
// Should we un-stale this issue?
|
// Should we un-stale this issue?
|
||||||
if (shouldRemoveStaleWhenUpdated && issueHasComments) {
|
if (
|
||||||
|
shouldRemoveStaleWhenUpdated &&
|
||||||
|
(issueHasUpdateSinceStale || issueHasCommentsSinceStale) &&
|
||||||
|
!issue.markedStaleThisRun
|
||||||
|
) {
|
||||||
issueLogger.info(
|
issueLogger.info(
|
||||||
`Remove the stale label since the $$type has a comment and the workflow should remove the stale label when updated`
|
`Remove the stale label since the $$type has been updated and the workflow should remove the stale label when updated`
|
||||||
);
|
);
|
||||||
await this._removeStaleLabel(issue, staleLabel);
|
await this._removeStaleLabel(issue, staleLabel);
|
||||||
|
|
||||||
@@ -693,7 +712,17 @@ export class IssuesProcessor {
|
|||||||
return; // Nothing to do because we aren't closing stale issues
|
return; // Nothing to do because we aren't closing stale issues
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!issueHasComments && !issueHasUpdate) {
|
const issueHasUpdateInCloseWindow: boolean = IssuesProcessor._updatedSince(
|
||||||
|
issue.updated_at,
|
||||||
|
daysBeforeClose
|
||||||
|
);
|
||||||
|
issueLogger.info(
|
||||||
|
`$$type has been updated in the last ${daysBeforeClose} days: ${LoggerService.cyan(
|
||||||
|
issueHasUpdateInCloseWindow
|
||||||
|
)}`
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!issueHasCommentsSinceStale && !issueHasUpdateInCloseWindow) {
|
||||||
issueLogger.info(
|
issueLogger.info(
|
||||||
`Closing $$type because it was last updated on: ${LoggerService.cyan(
|
`Closing $$type because it was last updated on: ${LoggerService.cyan(
|
||||||
issue.updated_at
|
issue.updated_at
|
||||||
@@ -712,7 +741,7 @@ export class IssuesProcessor {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
issueLogger.info(
|
issueLogger.info(
|
||||||
`Stale $$type is not old enough to close yet (hasComments? ${issueHasComments}, hasUpdate? ${issueHasUpdate})`
|
`Stale $$type is not old enough to close yet (hasComments? ${issueHasCommentsSinceStale}, hasUpdate? ${issueHasUpdateInCloseWindow})`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -738,8 +767,8 @@ export class IssuesProcessor {
|
|||||||
|
|
||||||
const filteredComments = comments.filter(
|
const filteredComments = comments.filter(
|
||||||
comment =>
|
comment =>
|
||||||
comment.user.type === 'User' &&
|
comment.user?.type === 'User' &&
|
||||||
comment.body.toLowerCase() !== staleMessage.toLowerCase()
|
comment.body?.toLowerCase() !== staleMessage.toLowerCase()
|
||||||
);
|
);
|
||||||
|
|
||||||
issueLogger.info(
|
issueLogger.info(
|
||||||
@@ -775,7 +804,7 @@ export class IssuesProcessor {
|
|||||||
this.statistics?.incrementAddedItemsComment(issue);
|
this.statistics?.incrementAddedItemsComment(issue);
|
||||||
|
|
||||||
if (!this.options.debugOnly) {
|
if (!this.options.debugOnly) {
|
||||||
await this.client.issues.createComment({
|
await this.client.rest.issues.createComment({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: issue.number,
|
issue_number: issue.number,
|
||||||
@@ -793,7 +822,7 @@ export class IssuesProcessor {
|
|||||||
this.statistics?.incrementStaleItemsCount(issue);
|
this.statistics?.incrementStaleItemsCount(issue);
|
||||||
|
|
||||||
if (!this.options.debugOnly) {
|
if (!this.options.debugOnly) {
|
||||||
await this.client.issues.addLabels({
|
await this.client.rest.issues.addLabels({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: issue.number,
|
issue_number: issue.number,
|
||||||
@@ -823,7 +852,7 @@ export class IssuesProcessor {
|
|||||||
this.addedCloseCommentIssues.push(issue);
|
this.addedCloseCommentIssues.push(issue);
|
||||||
|
|
||||||
if (!this.options.debugOnly) {
|
if (!this.options.debugOnly) {
|
||||||
await this.client.issues.createComment({
|
await this.client.rest.issues.createComment({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: issue.number,
|
issue_number: issue.number,
|
||||||
@@ -841,7 +870,7 @@ export class IssuesProcessor {
|
|||||||
this.statistics?.incrementAddedItemsLabel(issue);
|
this.statistics?.incrementAddedItemsLabel(issue);
|
||||||
|
|
||||||
if (!this.options.debugOnly) {
|
if (!this.options.debugOnly) {
|
||||||
await this.client.issues.addLabels({
|
await this.client.rest.issues.addLabels({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: issue.number,
|
issue_number: issue.number,
|
||||||
@@ -858,11 +887,12 @@ export class IssuesProcessor {
|
|||||||
this.statistics?.incrementClosedItemsCount(issue);
|
this.statistics?.incrementClosedItemsCount(issue);
|
||||||
|
|
||||||
if (!this.options.debugOnly) {
|
if (!this.options.debugOnly) {
|
||||||
await this.client.issues.update({
|
await this.client.rest.issues.update({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: issue.number,
|
issue_number: issue.number,
|
||||||
state: 'closed'
|
state: 'closed',
|
||||||
|
state_reason: this.options.closeIssueReason || undefined
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -900,7 +930,7 @@ export class IssuesProcessor {
|
|||||||
this.statistics?.incrementDeletedBranchesCount();
|
this.statistics?.incrementDeletedBranchesCount();
|
||||||
|
|
||||||
if (!this.options.debugOnly) {
|
if (!this.options.debugOnly) {
|
||||||
await this.client.git.deleteRef({
|
await this.client.rest.git.deleteRef({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
ref: `heads/${branch}`
|
ref: `heads/${branch}`
|
||||||
@@ -935,7 +965,7 @@ export class IssuesProcessor {
|
|||||||
this.statistics?.incrementDeletedItemsLabelsCount(issue);
|
this.statistics?.incrementDeletedItemsLabelsCount(issue);
|
||||||
|
|
||||||
if (!this.options.debugOnly) {
|
if (!this.options.debugOnly) {
|
||||||
await this.client.issues.removeLabel({
|
await this.client.rest.issues.removeLabel({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: issue.number,
|
issue_number: issue.number,
|
||||||
@@ -995,6 +1025,10 @@ export class IssuesProcessor {
|
|||||||
return this.options.onlyLabels;
|
return this.options.onlyLabels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _isIncludeOnlyAssigned(issue: Issue): boolean {
|
||||||
|
return this.options.includeOnlyAssigned && !issue.hasAssignees;
|
||||||
|
}
|
||||||
|
|
||||||
private _getAnyOfLabels(issue: Issue): string {
|
private _getAnyOfLabels(issue: Issue): string {
|
||||||
if (issue.isPullRequest) {
|
if (issue.isPullRequest) {
|
||||||
if (this.options.anyOfPrLabels !== '') {
|
if (this.options.anyOfPrLabels !== '') {
|
||||||
@@ -1068,7 +1102,7 @@ export class IssuesProcessor {
|
|||||||
this._consumeIssueOperation(issue);
|
this._consumeIssueOperation(issue);
|
||||||
this.statistics?.incrementAddedItemsLabel(issue);
|
this.statistics?.incrementAddedItemsLabel(issue);
|
||||||
if (!this.options.debugOnly) {
|
if (!this.options.debugOnly) {
|
||||||
await this.client.issues.addLabels({
|
await this.client.rest.issues.addLabels({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: issue.number,
|
issue_number: issue.number,
|
||||||
|
|||||||
@@ -46,5 +46,6 @@ export enum Option {
|
|||||||
IgnoreUpdates = 'ignore-updates',
|
IgnoreUpdates = 'ignore-updates',
|
||||||
IgnoreIssueUpdates = 'ignore-issue-updates',
|
IgnoreIssueUpdates = 'ignore-issue-updates',
|
||||||
IgnorePrUpdates = 'ignore-pr-updates',
|
IgnorePrUpdates = 'ignore-pr-updates',
|
||||||
ExemptDraftPr = 'exempt-draft-pr'
|
ExemptDraftPr = 'exempt-draft-pr',
|
||||||
|
CloseIssueReason = 'close-issue-reason'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,6 @@ import {CleanLabel} from '../types/clean-label';
|
|||||||
*
|
*
|
||||||
* @return {string} A lowercased, deburred version of the passed in label
|
* @return {string} A lowercased, deburred version of the passed in label
|
||||||
*/
|
*/
|
||||||
export function cleanLabel(label: Readonly<string>): CleanLabel {
|
export function cleanLabel(label?: Readonly<string>): CleanLabel {
|
||||||
return deburr(label.toLowerCase());
|
return deburr(label?.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {isDateMoreRecentThan} from './is-date-more-recent-than';
|
import {isDateEqualTo, isDateMoreRecentThan} from './is-date-more-recent-than';
|
||||||
|
|
||||||
describe('isDateMoreRecentThan()', (): void => {
|
describe('isDateMoreRecentThan()', (): void => {
|
||||||
let date: Date;
|
let date: Date;
|
||||||
@@ -48,4 +48,68 @@ describe('isDateMoreRecentThan()', (): void => {
|
|||||||
expect(result).toStrictEqual(true);
|
expect(result).toStrictEqual(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('date equality', (): void => {
|
||||||
|
it('should correctly compare a before date outside tolerance', (): void => {
|
||||||
|
const aDate = new Date('2022-09-09T13:00:00');
|
||||||
|
const otherDate = new Date('2022-09-09T14:00:00');
|
||||||
|
expect(isDateEqualTo(aDate, otherDate, 60)).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should correctly compare a before date inside tolerance', (): void => {
|
||||||
|
const aDate = new Date('2022-09-09T13:00:00');
|
||||||
|
const otherDate = new Date('2022-09-09T13:00:42');
|
||||||
|
expect(isDateEqualTo(aDate, otherDate, 60)).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should correctly compare an after date outside tolerance', (): void => {
|
||||||
|
const aDate = new Date('2022-09-09T13:00:00');
|
||||||
|
const otherDate = new Date('2022-09-09T12:00:00');
|
||||||
|
expect(isDateEqualTo(aDate, otherDate, 60)).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should correctly compare an after date inside tolerance', (): void => {
|
||||||
|
const aDate = new Date('2022-09-09T13:00:00');
|
||||||
|
const otherDate = new Date('2022-09-09T12:59:42');
|
||||||
|
expect(isDateEqualTo(aDate, otherDate, 60)).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should correctly compare an exactly equal date', (): void => {
|
||||||
|
const aDate = new Date('2022-09-09T13:00:00');
|
||||||
|
const otherDate = new Date('2022-09-09T13:00:00');
|
||||||
|
expect(isDateEqualTo(aDate, otherDate, 60)).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('date comparison with tolerances', (): void => {
|
||||||
|
it('should correctly compare a before date outside tolerance', (): void => {
|
||||||
|
const aDate = new Date('2022-09-09T13:00:00');
|
||||||
|
const otherDate = new Date('2022-09-09T14:00:00');
|
||||||
|
expect(isDateMoreRecentThan(aDate, otherDate)).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should correctly compare a before date inside tolerance', (): void => {
|
||||||
|
const aDate = new Date('2022-09-09T13:00:00');
|
||||||
|
const otherDate = new Date('2022-09-09T13:00:42');
|
||||||
|
expect(isDateMoreRecentThan(aDate, otherDate, 60)).toBe(false); // considered equal here
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should correctly compare an after date outside tolerance', (): void => {
|
||||||
|
const aDate = new Date('2022-09-09T13:00:00');
|
||||||
|
const otherDate = new Date('2022-09-09T12:00:00');
|
||||||
|
expect(isDateMoreRecentThan(aDate, otherDate, 60)).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should correctly compare an after date inside tolerance', (): void => {
|
||||||
|
const aDate = new Date('2022-09-09T13:00:00');
|
||||||
|
const otherDate = new Date('2022-09-09T12:59:42');
|
||||||
|
expect(isDateMoreRecentThan(aDate, otherDate, 60)).toBe(false); // considered equal here
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should correctly compare an exactly equal date', (): void => {
|
||||||
|
const aDate = new Date('2022-09-09T13:00:00');
|
||||||
|
const otherDate = new Date('2022-09-09T13:00:00');
|
||||||
|
expect(isDateMoreRecentThan(aDate, otherDate, 60)).toBe(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,31 @@
|
|||||||
|
/// returns false if the dates are equal within the `equalityToleranceInSeconds` number of seconds
|
||||||
|
/// otherwise returns true if `comparedDate` is after `date`
|
||||||
|
|
||||||
export function isDateMoreRecentThan(
|
export function isDateMoreRecentThan(
|
||||||
date: Readonly<Date>,
|
date: Readonly<Date>,
|
||||||
comparedDate: Readonly<Date>
|
comparedDate: Readonly<Date>,
|
||||||
|
equalityToleranceInSeconds = 0
|
||||||
): boolean {
|
): boolean {
|
||||||
|
if (equalityToleranceInSeconds > 0) {
|
||||||
|
const areDatesEqual = isDateEqualTo(
|
||||||
|
date,
|
||||||
|
comparedDate,
|
||||||
|
equalityToleranceInSeconds
|
||||||
|
);
|
||||||
|
|
||||||
|
return !areDatesEqual && date > comparedDate;
|
||||||
|
}
|
||||||
|
|
||||||
return date > comparedDate;
|
return date > comparedDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isDateEqualTo(
|
||||||
|
date: Date,
|
||||||
|
otherDate: Date,
|
||||||
|
toleranceInSeconds: number
|
||||||
|
): boolean {
|
||||||
|
const timestamp = date.getTime();
|
||||||
|
const otherTimestamp = otherDate.getTime();
|
||||||
|
const deltaInSeconds = Math.abs(timestamp - otherTimestamp) / 1000;
|
||||||
|
return deltaInSeconds <= toleranceInSeconds;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {IUser} from './user';
|
import {IUser} from './user';
|
||||||
|
|
||||||
export interface IComment {
|
export interface IComment {
|
||||||
user: IUser;
|
user: IUser | null;
|
||||||
body: string;
|
body?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,16 +2,18 @@ import {IsoDateString} from '../types/iso-date-string';
|
|||||||
import {Assignee} from './assignee';
|
import {Assignee} from './assignee';
|
||||||
import {ILabel} from './label';
|
import {ILabel} from './label';
|
||||||
import {IMilestone} from './milestone';
|
import {IMilestone} from './milestone';
|
||||||
|
import {components} from '@octokit/openapi-types';
|
||||||
export interface IIssue {
|
export interface IIssue {
|
||||||
title: string;
|
title: string;
|
||||||
number: number;
|
number: number;
|
||||||
created_at: IsoDateString;
|
created_at: IsoDateString;
|
||||||
updated_at: IsoDateString;
|
updated_at: IsoDateString;
|
||||||
labels: ILabel[];
|
labels: ILabel[];
|
||||||
pull_request: Object | null | undefined;
|
pull_request?: Object | null;
|
||||||
state: string;
|
state: string;
|
||||||
locked: boolean;
|
locked: boolean;
|
||||||
milestone: IMilestone | undefined;
|
milestone?: IMilestone | null;
|
||||||
assignees: Assignee[];
|
assignees?: Assignee[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type OctokitIssue = components['schemas']['issue'];
|
||||||
|
|||||||
@@ -51,4 +51,6 @@ export interface IIssuesProcessorOptions {
|
|||||||
ignoreIssueUpdates: boolean | undefined;
|
ignoreIssueUpdates: boolean | undefined;
|
||||||
ignorePrUpdates: boolean | undefined;
|
ignorePrUpdates: boolean | undefined;
|
||||||
exemptDraftPr: boolean;
|
exemptDraftPr: boolean;
|
||||||
|
closeIssueReason: string;
|
||||||
|
includeOnlyAssigned: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
export interface ILabel {
|
export interface ILabel {
|
||||||
name: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ export interface IPullRequest {
|
|||||||
head: {
|
head: {
|
||||||
ref: string;
|
ref: string;
|
||||||
};
|
};
|
||||||
draft: boolean;
|
draft?: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
33
src/main.ts
33
src/main.ts
@@ -28,11 +28,11 @@ function _getAndValidateArgs(): IIssuesProcessorOptions {
|
|||||||
stalePrMessage: core.getInput('stale-pr-message'),
|
stalePrMessage: core.getInput('stale-pr-message'),
|
||||||
closeIssueMessage: core.getInput('close-issue-message'),
|
closeIssueMessage: core.getInput('close-issue-message'),
|
||||||
closePrMessage: core.getInput('close-pr-message'),
|
closePrMessage: core.getInput('close-pr-message'),
|
||||||
daysBeforeStale: parseInt(
|
daysBeforeStale: parseFloat(
|
||||||
core.getInput('days-before-stale', {required: true})
|
core.getInput('days-before-stale', {required: true})
|
||||||
),
|
),
|
||||||
daysBeforeIssueStale: parseInt(core.getInput('days-before-issue-stale')),
|
daysBeforeIssueStale: parseFloat(core.getInput('days-before-issue-stale')),
|
||||||
daysBeforePrStale: parseInt(core.getInput('days-before-pr-stale')),
|
daysBeforePrStale: parseFloat(core.getInput('days-before-pr-stale')),
|
||||||
daysBeforeClose: parseInt(
|
daysBeforeClose: parseInt(
|
||||||
core.getInput('days-before-close', {required: true})
|
core.getInput('days-before-close', {required: true})
|
||||||
),
|
),
|
||||||
@@ -87,14 +87,20 @@ function _getAndValidateArgs(): IIssuesProcessorOptions {
|
|||||||
ignoreUpdates: core.getInput('ignore-updates') === 'true',
|
ignoreUpdates: core.getInput('ignore-updates') === 'true',
|
||||||
ignoreIssueUpdates: _toOptionalBoolean('ignore-issue-updates'),
|
ignoreIssueUpdates: _toOptionalBoolean('ignore-issue-updates'),
|
||||||
ignorePrUpdates: _toOptionalBoolean('ignore-pr-updates'),
|
ignorePrUpdates: _toOptionalBoolean('ignore-pr-updates'),
|
||||||
exemptDraftPr: core.getInput('exempt-draft-pr') === 'true'
|
exemptDraftPr: core.getInput('exempt-draft-pr') === 'true',
|
||||||
|
closeIssueReason: core.getInput('close-issue-reason'),
|
||||||
|
includeOnlyAssigned: core.getInput('include-only-assigned') === 'true'
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const numberInput of [
|
for (const numberInput of ['days-before-stale']) {
|
||||||
'days-before-stale',
|
if (isNaN(parseFloat(core.getInput(numberInput)))) {
|
||||||
'days-before-close',
|
const errorMessage = `Option "${numberInput}" did not parse to a valid float`;
|
||||||
'operations-per-run'
|
core.setFailed(errorMessage);
|
||||||
]) {
|
throw new Error(errorMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const numberInput of ['days-before-close', 'operations-per-run']) {
|
||||||
if (isNaN(parseInt(core.getInput(numberInput)))) {
|
if (isNaN(parseInt(core.getInput(numberInput)))) {
|
||||||
const errorMessage = `Option "${numberInput}" did not parse to a valid integer`;
|
const errorMessage = `Option "${numberInput}" did not parse to a valid integer`;
|
||||||
core.setFailed(errorMessage);
|
core.setFailed(errorMessage);
|
||||||
@@ -113,6 +119,15 @@ function _getAndValidateArgs(): IIssuesProcessorOptions {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const validCloseReasons = ['', 'completed', 'not_planned'];
|
||||||
|
if (!validCloseReasons.includes(args.closeIssueReason)) {
|
||||||
|
const errorMessage = `Unrecognized close-issue-reason "${
|
||||||
|
args.closeIssueReason
|
||||||
|
}", valid values are: ${validCloseReasons.filter(Boolean).join(', ')}`;
|
||||||
|
core.setFailed(errorMessage);
|
||||||
|
throw new Error(errorMessage);
|
||||||
|
}
|
||||||
|
|
||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user