Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6fd6fcf

Browse files
Create auto-assign.yml
1 parent 102f8eb commit 6fd6fcf

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

‎.github/workflows/auto-assign.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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_dispatch:
9+
10+
jobs:
11+
assign_issues:
12+
if: >
13+
(github.event_name == 'issue_comment' && (
14+
startsWith(github.event.comment.body, '/assign') ||
15+
startsWith(github.event.comment.body, '/unassign') ||
16+
contains(github.event.comment.body, 'assign to me') ||
17+
contains(github.event.comment.body, 'please assign me this') ||
18+
contains(github.event.comment.body, 'assign this to me') ||
19+
contains(github.event.comment.body, 'assign this issue to me') ||
20+
contains(github.event.comment.body, 'I can try fixing this') ||
21+
contains(github.event.comment.body, 'i am interested in doing this') ||
22+
contains(github.event.comment.body, 'I am interested in contributing'))) || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Check for issue assignees
26+
uses: actions/github-script@v4
27+
with:
28+
github-token: ${{ secrets.GITHUB_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 github.issues.addAssignees(config);
40+
} else {
41+
return true;
42+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /