@@ -42,21 +42,28 @@ jobs:
4242 github-user : ${{ github.actor }}
4343 github-token : ${{ steps.get_token.outputs.token }}
4444
45+ - id : user_type
46+ uses : elastic/oblt-actions/github/user-type@github-is-bot
47+ with :
48+ github-user : ${{ github.actor }}
49+ github-token : ${{ steps.get_token.outputs.token }}
50+
4551 - name : debug
4652 run : |
47- echo "is_elastic_member=${{ steps.is_elastic_member.outputs.result }}"
48- echo "github.actor=${{ github.actor }}"
49- echo "github.event_name=${{ github.event_name }}"
53+ echo "::notice:: is_elastic_member=${{ steps.is_elastic_member.outputs.result }}"
54+ echo "::notice:: user_type=${{ steps.user_type.outputs.result }}"
55+ echo "::notice:: github.actor=${{ github.actor }}"
56+ echo "::notice:: github.event_name=${{ github.event_name }}"
5057
5158 - name : Add community and triage labels
52- if : contains( steps.is_elastic_member.outputs.result, 'false')
59+ if : steps.is_elastic_member.outputs.result == 'false' && steps.user_type.outputs.result == 'User'
5360 run : gh issue edit "${NUMBER}" --add-label "community,triage" --repo "${{ github.repository }}"
5461 env :
5562 NUMBER : ${{ github.event.issue.number || github.event.pull_request.number }}
5663 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5764
5865 - name : Add comment for community PR
59- if : contains( steps.is_elastic_member.outputs.result, 'false')
66+ if : steps.is_elastic_member.outputs.result == 'false' && steps.user_type.outputs.result == 'User'
6067 uses : wow-actions/auto-comment@v1
6168 with :
6269 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6976
7077 - name : Assign new internal pull requests to project
7178 id : add-to-project
72- if : contains( steps.is_elastic_member.outputs.result, 'true') && github.event_name == 'pull_request_target'
79+ if : steps.is_elastic_member.outputs.result == 'true' && github.event_name == 'pull_request_target'
7380 uses : elastic/oblt-actions/github/project-add@v1
7481 with :
7582 github-token : ${{ steps.get_token.outputs.token }}
7885
7986 - name : set status in project
8087 id : set-project-status-field
81- if : contains( steps.is_elastic_member.outputs.result, 'true') && github.event_name == 'pull_request_target'
88+ if : steps.is_elastic_member.outputs.result == 'true' && github.event_name == 'pull_request_target'
8289 uses : elastic/oblt-actions/github/project-field-set@v1
8390 with :
8491 github-token : ${{ steps.get_token.outputs.token }}
8996
9097 - name : set agent in project
9198 id : set-project-agent-field
92- if : contains( steps.is_elastic_member.outputs.result, 'true') && github.event_name == 'pull_request_target'
99+ if : steps.is_elastic_member.outputs.result == 'true' && github.event_name == 'pull_request_target'
93100 uses : elastic/oblt-actions/github/project-field-set@v1
94101 with :
95102 github-token : ${{ steps.get_token.outputs.token }}
@@ -100,7 +107,7 @@ jobs:
100107
101108 - name : set iteration in project
102109 id : set-project-iteration-field
103- if : contains( steps.is_elastic_member.outputs.result, 'true') && github.event_name == 'pull_request_target'
110+ if : steps.is_elastic_member.outputs.result == 'true' && github.event_name == 'pull_request_target'
104111 uses : elastic/oblt-actions/github/project-field-set@v1
105112 with :
106113 github-token : ${{ steps.get_token.outputs.token }}
0 commit comments