🧠 Implement AI-powered task prioritization algorithm #2
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: New Issue Helper | |
| on: | |
| issues: | |
| types: [opened] | |
| jobs: | |
| comment: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const issue = context.payload.issue; | |
| const author = issue.user.login; | |
| const isFirstIssue = await github.rest.search.issuesAndPullRequests({ | |
| q: `repo:${context.repo.owner}/${context.repo.repo} is:issue author:${author}`, | |
| per_page: 1 | |
| }); | |
| if (isFirstIssue.data.total_count <= 1) { | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: issue.number, | |
| body: `👋 Hi @${author}! Thanks for opening your first issue. Check our [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.` | |
| }); | |
| } |