File tree 2 files changed +23
-0
lines changed
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ name: Auto-assign workflows
2
2
3
3
on :
4
4
workflow_call :
5
+ workflow_dispatch :
5
6
6
7
jobs :
7
8
assign-on-issue :
@@ -37,11 +38,22 @@ jobs:
37
38
assing-contributor-on-pr :
38
39
runs-on : ubuntu-latest
39
40
if : ${{github.event_name == 'pull_request'}}
41
+
40
42
steps :
43
+ - name : Check if pr has assignee
44
+ id : check
45
+ run : |
46
+ ASSIGNEES=$(curl -H "Authorization: token ${{secrets.PERSONAL_ACCESS_TOKEN}}" \
47
+ "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/assignees" | jq length)
48
+ echo "::set-output name=assignees::$ASSIGNEES"
49
+ shell : bash
50
+
41
51
- name : Checkout
52
+ if : ${{ steps.check.outputs.assignees == '0' }}
42
53
uses : actions/checkout@v4.1.7
43
54
44
55
- name : Assigna o criador do pr no proprio pr
56
+ if : ${{ steps.check.outputs.assignees == '0' }}
45
57
run : gh pr edit ${{ github.event.pull_request.number }} --add-assignee ${{ github.actor }}
46
58
env :
47
59
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : Base Actions
2
+
3
+ on :
4
+ issue_comment :
5
+ types : [created]
6
+ pull_request :
7
+
8
+ jobs :
9
+ assignes :
10
+ uses : devhatt/workflows/.github/workflows/auto-assign.yml@main
11
+ secrets : inherit
You can’t perform that action at this time.
0 commit comments