From e4cfdc2bc0e57df6125900fce3e5c1c904b1c526 Mon Sep 17 00:00:00 2001 From: Anit Sarkar Date: Wed, 16 Oct 2024 17:23:46 +0530 Subject: [PATCH] Update workflows issue reminder addition --- .github/workflows/issue reminder.yml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/issue reminder.yml diff --git a/.github/workflows/issue reminder.yml b/.github/workflows/issue reminder.yml new file mode 100644 index 00000000..dc312dd9 --- /dev/null +++ b/.github/workflows/issue reminder.yml @@ -0,0 +1,32 @@ +name: 'open-issue reminder' + +on: + schedule: + - cron: '15 4 * * *' +jobs: + welcome: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Run script + uses: actions/github-script@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const { data: issues } = await github.issues.listForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open' + }); + for (const issue of issues) { + const issueComment = `Hi there! This issue is still open. We are looking forward to your response. + Assignees: ${issue.assignees.map(assignee => '@' + assignee.login).join(', ') || 'None'}`; + await github.issues.createComment({ + issue_number: issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: issueComment + }); + } \ No newline at end of file