History

Delete close_unlabeled_issues.yml

I'm going to write something more robust using PyGitHub.

Joseph T Lyons committed 2 years ago

Commit fcfd7691 parent 285fb511 file · +0 −32Browse files

Unified · Split

.github/workflows/close_unlabeled_issues.yml+0−32
@@ -1,32 +0,0 @@
1−name: Close Unlabeled Issues
2−
3−on:
4− schedule:
5− - cron: "0 * * * *"
6− workflow_dispatch:
7−
8−jobs:
9− close-unlabeled-issue:
10− runs-on: ubuntu-latest
11− steps:
12− - name: Check for labels and close if unlabeled
13− uses: actions/github-script@v6
14− with:
15− github-token: ${{secrets.GITHUB_TOKEN}}
16− script: |
17− const issue = context.payload.issue;
18− if (issue.labels.length === 0) {
19− const issueNumber = issue.number;
20− await github.rest.issues.update({
21− owner: context.repo.owner,
22− repo: context.repo.repo,
23− issue_number: issueNumber,
24− state: 'closed'
25− });
26− await github.rest.issues.createComment({
27− owner: context.repo.owner,
28− repo: context.repo.repo,
29− issue_number: issueNumber,
30− body: 'This issue has been automatically closed because it was created without using an issue template. Please reopen your issue using one of the following issue templates:\n\nhttps://github.com/zed-industries/zed/issues/new/choose'
31− });
32− }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t