From fcfd769b3936cfb4dcd4cc9ec8dbd2fff5be76be Mon Sep 17 00:00:00 2001 From: Joseph T Lyons Date: Wed, 9 Oct 2024 22:27:10 -0400 Subject: [PATCH] Delete close_unlabeled_issues.yml I'm going to write something more robust using PyGitHub. --- .github/workflows/close_unlabeled_issues.yml | 32 -------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/workflows/close_unlabeled_issues.yml diff --git a/.github/workflows/close_unlabeled_issues.yml b/.github/workflows/close_unlabeled_issues.yml deleted file mode 100644 index 0f010fdbbc..0000000000 --- a/.github/workflows/close_unlabeled_issues.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Close Unlabeled Issues - -on: - schedule: - - cron: "0 * * * *" - workflow_dispatch: - -jobs: - close-unlabeled-issue: - runs-on: ubuntu-latest - steps: - - name: Check for labels and close if unlabeled - uses: actions/github-script@v6 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - const issue = context.payload.issue; - if (issue.labels.length === 0) { - const issueNumber = issue.number; - await github.rest.issues.update({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - state: 'closed' - }); - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - 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' - }); - }