Skip to content
Closed
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
7 changes: 4 additions & 3 deletions .github/workflows/update-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
- name: Commit and Create Pull Request
env:
GH_TOKEN: ${{ secrets.ACTIONS_BOT }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
PR_BODY: |
**This is an automated pull-request**

Expand All @@ -73,19 +74,19 @@ jobs:

git push -f origin update-framework

PR_NUMBER=$(gh pr list --head "update-framework" --state open --template '{{range .}}{{ .number }}{{end}}')
PR_NUMBER=$(gh api --method GET "repos/${{ github.repository }}/pulls" -f head="${{ github.repository_owner }}:update-framework" -f base="$DEFAULT_BRANCH" -f state="open" --jq '.[0].number // empty')
if [ -z "$PR_NUMBER" ]; then
gh pr create \
--title "Update wp-cli framework" \
--body "$PR_BODY" \
--label "scope:framework" \
--base "${{ github.event.repository.default_branch }}" \
--base "$DEFAULT_BRANCH" \
--head "update-framework"
else
gh pr edit "$PR_NUMBER" \
--title "Update wp-cli framework" \
--body "$PR_BODY" \
--add-label "scope:framework" \
--base "${{ github.event.repository.default_branch }}"
--base "$DEFAULT_BRANCH"
fi
fi
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading