Is the project still active ?? #48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Issue Management | |
| on: | |
| issues: | |
| types: | |
| - opened | |
| jobs: | |
| manage_issue: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check if the user has raised issues before | |
| id: check_user | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| const { data: issues } = await github.rest.issues.listForRepo({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| creator: context.payload.issue.user.login, | |
| state: 'all', | |
| }); | |
| const isFirstIssue = issues.length === 1; // Only this issue exists | |
| core.setOutput('is_first_issue', isFirstIssue); | |
| - name: Add the hacktoberfest label | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.issue.number, | |
| labels: ['hacktoberfest'], | |
| }); | |
| - name: Send a welcome message if it's the user's first issue | |
| if: steps.check_user.outputs.is_first_issue == 'true' | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.issue.number, | |
| body: `Welcome to 603 WorkVed, very happy to have you on board `, | |
| }); |