Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Test pull request #616

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
happyPath:
name: "[TEST] Update existing pull request"
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -65,7 +68,7 @@ jobs:
commit-message: Just testing [skip ci]
author: J. Doe <j@example.com>
labels: test1, test2
assignees: gr2m
assignees: kfcampbell
- run: >-
git push
https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
Expand Down Expand Up @@ -107,7 +110,6 @@ jobs:
test-create-new-pull-request-with-multiple-commits-${{
github.run_number }}
author: J. Doe <j@example.com>
path: file1.txt
commit-message: file 1 created [skip ci]
- uses: ./
env:
Expand All @@ -120,7 +122,6 @@ jobs:
test-create-new-pull-request-with-multiple-commits-${{
github.run_number }}
author: J. Doe <j@example.com>
path: file2.txt
commit-message: file 2 created [skip ci]
- uses: ./
env:
Expand All @@ -133,7 +134,6 @@ jobs:
test-create-new-pull-request-with-multiple-commits-${{
github.run_number }}
author: J. Doe <j@example.com>
path: does_not_exist.txt
commit-message: this should fail silently, not commit should be created
- run: >-
git push
Expand Down Expand Up @@ -242,7 +242,7 @@ jobs:
id: get-pull-request
with:
route: GET /repos/{owner}/{repo}/pulls/{pull_number}
owner: gr2m
owner: kfcampbell
repo: create-or-update-pull-request-action
pull_number: ${{ steps.run.outputs.pull-request-number }}
env:
Expand Down Expand Up @@ -284,13 +284,12 @@ jobs:
body: This pull request is part of the CI - please ignore.
branch: test-add-reviewers-${{ github.run_number }}
commit-message: Just testing [skip ci]
reviewers: gr2m
team_reviewers: test-reviewers
reviewers: kfcampbell
- uses: octokit/request-action@v2.x
id: get-pull-request
with:
route: GET /repos/{owner}/{repo}/pulls/{pull_number}
owner: gr2m
owner: kfcampbell
repo: create-or-update-pull-request-action
pull_number: ${{ steps.run.outputs.pull-request-number }}
env:
Expand All @@ -304,8 +303,8 @@ jobs:
- if: >-
${{
!contains(toJson(fromJson(steps.get-pull-request.outputs.data).requested_reviewers.*.login),
'gr2m') }}
'kfcampbell') }}
run: >-
echo "Requested reviewers are \"${{
toJson(fromJson(steps.get-pull-request.outputs.data).requested_reviewers.*.login)
}}\" but expected \"[\n gr2m \n]\"" && exit 1
}}\" but expected \"[\n kfcampbell \n]\"" && exit 1
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
node_modules
dist
node_modules
7 changes: 5 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,18 @@ inputs:
description: Commit message for all uncommited changes.
required: true
default: Update from 'Create or Update Request' action
path:
description: Commit selected files only by providing a path. It is used in `git add "<path>"`
path-to-cd-to:
description: Commit changes in another repository by providing a path to cd to (using Node's process.chdir function) before git operations.
required: false
labels:
description: Comma separated list of labels to apply to the pull request
required: false
assignees:
description: Comma separated list of assignees to apply to the pull request
required: false
repository:
description: Repository name in the format owner/repo. Defaults to current repository if not given. Use with path-to-cd-to.
required: false
reviewers:
description: Comma separated list of reviewers to apply to the pull request
required: false
Expand Down
Loading