File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 3
3
# This is a basic workflow to help you get started with Actions
4
4
5
5
name : " Metadata Changes"
6
- # Controls when the action will run. Triggers the workflow on push or pull request
7
- # events but only for the master branch
8
6
on :
9
7
workflow_dispatch :
10
8
pull_request :
11
- types : [opened, synchronize, reopened, closed]
12
9
branches :
13
10
- dev
11
+ paths :
12
+ - openApiDocs/**
13
+ - src/Authentication/Authentication/custom/common/MgCommandMetadata.json
14
+ - docs/OpenApiInfo/**
14
15
15
16
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
16
17
jobs :
17
18
CheckForMetadataChanges :
18
19
# The type of runner that the job will run on
19
20
runs-on : ubuntu-latest
21
+ permissions :
22
+ pull-requests : write
20
23
if : github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.action != 'closed')
21
24
# Steps represent a sequence of tasks that will be executed as part of the job
22
25
steps :
50
53
body : body
51
54
})
52
55
56
+ await github.rest.pulls.createReview({
57
+ owner : context.repo.owner,
58
+ repo : context.repo.repo,
59
+ body : body,
60
+ pull_number : context.issue.number,
61
+ event : ' REQUEST_CHANGES'
62
+ })
63
+
64
+ core.setFailed(body)
65
+
53
66
# [0] https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables
54
67
# [1] https://hub.github.com/hub-pull-request.1.html
55
68
# https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
You can’t perform that action at this time.
0 commit comments