Skip to content

Commit

Permalink
ci(test): add assertion testing for new pull request title
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Dec 21, 2021
1 parent a79ba5c commit 01439f1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,17 @@ jobs:
branch: test-update-pr-title-and-body
commit-message: "Just testing [skip ci]"
update-pull-request-title-and-body: true
- uses: octokit/request-action@v2.x
id: get-pull-request
with:
route: GET /repos/{owner}/{repo}/pulls/{pull_number}
owner: gr2m
repo: create-or-update-pull-request-action
pull_number: ${{ steps.run.outputs.pull-request-number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: ${{ fromJson(steps.get-pull-request.outputs.data).title != 'Updated test pull request' }}
run: 'echo "Pull request title is \"${{ fromJson(steps.get-pull-request.outputs.data).title }}\" but expected \"Updated test pull request\"" && exit 1'
- run: "git push https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git :test-update-pr-title-and-body"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 01439f1

Please sign in to comment.