File tree
Expand file treeCollapse file tree1 file changed
+42
-0
lines changed Expand file treeCollapse file tree1 file changed
+42
-0
lines changed Original file line number | Diff line number | Diff line change |
---|
|
| 1 | +name: Auto Assign |
| 2 | + |
| 3 | +on: |
| 4 | +issue_comment: |
| 5 | +types: [created] |
| 6 | +schedule: |
| 7 | +- cron: '0 0 * * *' # Runs daily at midnight |
| 8 | +workflow_dis: |
| 9 | + |
| 10 | +jobs: |
| 11 | +assign_issues: |
| 12 | +if: > |
| 13 | +(.event_name == 'issue_comment' && ( |
| 14 | +startsWith(.event.comment.body, '/assign') || |
| 15 | +startsWith(.event.comment.body, '/unassign') || |
| 16 | +contains(.event.comment.body, 'assign to me') || |
| 17 | +contains(.event.comment.body, 'please assign me this') || |
| 18 | +contains(.event.comment.body, 'assign this to me') || |
| 19 | +contains(.event.comment.body, 'assign this issue to me') || |
| 20 | +contains(.event.comment.body, 'I can try fixing this') || |
| 21 | +contains(.event.comment.body, 'i am interested in doing this') || |
| 22 | +contains(.event.comment.body, 'I am interested in contributing'))) || .event_name == 'schedule' || .event_name == 'workflow_dis' |
| 23 | + runs-on: ubuntu-latest |
| 24 | +steps: |
| 25 | +- name: Check for issue assignees |
| 26 | +uses: actions/-script@v4 |
| 27 | +with: |
| 28 | +-token: ${{ secrets._TOKEN }} |
| 29 | +script: | |
| 30 | +const issueNumber = context.payload.issue.number; |
| 31 | +if (issueNumber) { |
| 32 | +const commenter = context.payload.comment.user.login; |
| 33 | +const config = { |
| 34 | +owner: 'avinashkranjan', |
| 35 | +repo: 'Pentesting-and-Hacking-Scripts', |
| 36 | +issue_number: issueNumber, |
| 37 | +assignees: [commenter] |
| 38 | +}; |
| 39 | +return .issues.addAssignees(config); |
| 40 | +} else { |
| 41 | +return true; |
| 42 | +} |
You can’t perform that action at this time.
0 commit comments