File tree 1 file changed +23
-0
lines changed 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : contributor-takes-action
2
+ description : This is an action to assign yourself to an issue for a repo you are not a contributor to.
3
+ author : Akshay Dongare
4
+ branding :
5
+ icon : ' thumbs-up'
6
+ color : ' white'
7
+
8
+
9
+ runs :
10
+ using : " composite"
11
+ steps :
12
+ -
13
+ run : |
14
+ BODY="$(jq '.comment.body' $GITHUB_EVENT_PATH)"
15
+ ISSUE_NUMBER="$(jq '.issue.number' $GITHUB_EVENT_PATH)"
16
+ LOGIN="$(jq '.comment.user.login' $GITHUB_EVENT_PATH | tr -d \")"
17
+ REPO="$(jq '.repository.full_name' $GITHUB_EVENT_PATH | tr -d \")"
18
+ if [[ $BODY == *"/assign"* ]]; then
19
+ echo "Assigning issue $ISSUE_NUMBER to $LOGIN"
20
+ echo "Using the link: https://api.github.com/repos/$REPO/issues/$ISSUE_NUMBER/assignees"
21
+ curl -H "Authorization: token $GITHUB_TOKEN" -d '{"assignees":["'"$LOGIN"'"]}' https://api.github.com/repos/$REPO/issues/$ISSUE_NUMBER/assignees
22
+ fi
23
+ shell : bash
You can’t perform that action at this time.
0 commit comments