File tree Expand file tree Collapse file tree 1 file changed +25
-4
lines changed
Expand file tree Collapse file tree 1 file changed +25
-4
lines changed Original file line number Diff line number Diff line change 66 chromatic-deployment :
77 name : Chromatic
88 runs-on : ubuntu-latest
9+ permissions :
10+ contents : read
11+ pull-requests : read
912 steps :
1013 - name : Checkout
1114 uses : actions/checkout@v1
@@ -21,11 +24,29 @@ jobs:
2124 autoAcceptChanges : true
2225 projectToken : ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
2326
24- - name : Comment PR
25- uses : thollander/actions-comment-pull-request@v3
27+ - name : Get PR data
28+ uses : actions/github-script@v7
29+ id : get_pr_data
2630 with :
27- message : |
28- Hello world ! :wave:
31+ script : |
32+ return (
33+ await github.rest.repos.listPullRequestsAssociatedWithCommit({
34+ commit_sha: context.sha,
35+ owner: context.repo.owner,
36+ repo: context.repo.repo,
37+ })
38+ ).data[0];
39+
40+ - name : Pull Request data
41+ run : |
42+ echo '${{ fromJson(steps.get_pr_data.outputs.result).number }}'
43+ echo '${{ fromJson(steps.get_pr_data.outputs.result).title }}'
44+
45+ # - name: Comment PR
46+ # uses: thollander/actions-comment-pull-request@v3
47+ # with:
48+ # message: |
49+ # Hello world ! :wave:
2950
3051 # - name: comment PR
3152 # uses: thollander/actions-comment-pull-request@v1
You can’t perform that action at this time.
0 commit comments