forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 1.09 KB
/
pull-request.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Retrieve PR Info
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
retrieve-pr-info:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Get PR description
id: get_pr_description
uses: octokit/[email protected]
with:
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Output PR description
run: echo "PR Description = ${{ steps.get_pr_description.outputs.data.body }}"
- name: Get PR commits
id: get_pr_commits
uses: octokit/[email protected]
with:
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/commits
token: ${{ secrets.GITHUB_TOKEN }}
- name: Output PR commit messages
run: |
echo "PR Commit Messages:"
for commit in $(echo '${{ steps.get_pr_commits.outputs.data }}' | jq -r '.[].commit.message'); do
echo "- $commit"
done