forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc2f9c5
commit ff060f1
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |