From 6449191c7695477a62c223bfe554472cdcf60b30 Mon Sep 17 00:00:00 2001 From: Abhishek Holani <43419831+Abhishek-90@users.noreply.github.com> Date: Sat, 14 Dec 2024 22:36:54 +0530 Subject: [PATCH] Removed issue-unassign workflow (#1579) --- .github/workflows/issue-unassign.yml | 59 ---------------------------- 1 file changed, 59 deletions(-) delete mode 100644 .github/workflows/issue-unassign.yml diff --git a/.github/workflows/issue-unassign.yml b/.github/workflows/issue-unassign.yml deleted file mode 100644 index 194d24ec21..0000000000 --- a/.github/workflows/issue-unassign.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Unassign inactive issues and add comment - -on: - schedule: - - cron: '0 * * * *' # Runs once daily - workflow_dispatch: - -jobs: - unassign_inactive_issues: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Find inactive issues - id: find_inactive - uses: dessant/issue-activity@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - days-before-stale: 0.04 # Set to 7 days of inactivity - stale-issue-message: 'This issue has been marked as inactive due to lack of activity.' - stale-pr-message: '' - exempt-issue-labels: '' - only-issue-labels: 'hacktoberfest' # Only check issues with 'hacktoberfest' label - operations-per-run: 100 - - - name: Add comment to inactive issues - if: steps.find_inactive.outputs.stale-issues != '' - uses: actions/github-script@v6 - with: - script: | - const issueNumber = 1526; - const issues = ${{ steps.find_inactive.outputs.stale-issues }}; - const issueNumbers = issues.split(','); - if (issueNumbers.includes(String(issueNumber))) { - const issue = await github.rest.issues.get({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - }); - - if (issue.data.assignee) { - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - body: `This issue has been inactive for 1 hour and will be unassigned.` - }); - } - } - - # Step 4: Unassign inactive issues - - name: Unassign inactive issues - if: steps.find_inactive.outputs.stale-issues != '' - uses: andymckay/assign@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ steps.find_inactive.outputs.stale-issues }} - assignees: ''