FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
TypeScript/.github/workflows/close-issues.yml at main · GoodForOneFare/TypeScript · GitHub
GoodForOneFare
TypeScript
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
TypeScript
/
.github
/
workflows
/
close-issues.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
73 lines (66 loc) · 2.54 KB
Breadcrumbs
TypeScript
/
.github
/
workflows
/
close-issues.yml
Copy path
File metadata and controls
73 lines (66 loc) · 2.54 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name
:
Close issues
on
:
schedule
:
-
cron
:
'
0 1 * * *
'
workflow_dispatch
:
permissions
:
contents
:
read
id-token
:
write
#
Ensure scripts are run with pipefail. See:
#
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
defaults
:
run
:
shell
:
bash
jobs
:
close-issues
:
runs-on
:
ubuntu-latest
environment
:
name
:
azure
deployment
:
false
if
:
github.repository == 'microsoft/TypeScript'
permissions
:
contents
:
read
#
Apparently required to create issues
id-token
:
write
issues
:
write
steps
:
-
uses
:
actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
#
v7.0.1
with
:
persist-credentials
:
false
-
uses
:
azure/login@a641126d1b8aa4d1fa005f4f92df94a3a4c4c906
#
v3.1.0
with
:
client-id
:
${{ vars.AZURE_CLIENT_ID }}
tenant-id
:
${{ vars.AZURE_TENANT_ID }}
subscription-id
:
${{ vars.AZURE_SUBSCRIPTION_ID }}
-
name
:
Create GitHub App token
id
:
app-token
uses
:
microsoft/create-github-app-token-via-key-vault@5ba0d436e9c3cac52feff4d1f2f66f9698ce4a2d
#
v1
with
:
client-id
:
${{ vars.TYPESCRIPT_AUTOMATION_GITHUB_APP_CLIENT_ID }}
key-id
:
${{ vars.TYPESCRIPT_AUTOMATION_GITHUB_APP_KEY_ID }}
owner
:
microsoft
repositories
:
TypeScript
permission-issues
:
write
-
name
:
Close issues
env
:
GH_TOKEN
:
${{ steps.app-token.outputs.token }}
REPO
:
${{ github.repository }}
run
:
|
DATE=$(date --date='2 days ago' --iso-8601)
close_issues() {
echo "Closing issues marked as '$1'."
for issue in $(gh issue list --limit 100 --label "$1" --repo "$REPO" --state open --search "updated:<$DATE" --json number --jq '.[].number'); do
echo "Closing https://github.com/$REPO/issues/$issue"
gh issue close $issue --repo "$REPO" --reason "not planned" --comment "This issue has been marked as \"$1\" and has seen no recent activity. It has been automatically closed for house-keeping purposes."
done
}
close_issues "Duplicate"
close_issues "Unactionable"
close_issues "Not a Defect"
close_issues "External"
close_issues "Working as Intended"
close_issues "Question"
close_issues "Out of Scope"
close_issues "Declined"
close_issues "Won't Fix"
close_issues "Too Complex"
close_issues "Design Limitation"
Back
|
FazBrowse Home
|
New Git URL