Skip to content
Merged
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
11 changes: 9 additions & 2 deletions .github/workflows/bump-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
# Therefore, use perl instead:
perl -pe 's/${{ matrix.components.local_version_regex }}/${1}'"${upstream_version}"'${3}/gi' -i "${files[@]}"
git add .
title="Build: Update ${{ matrix.components.name }} to ${upstream_version}"
title="Build: Bump ${{ matrix.components.name }} from ${local_version} to ${upstream_version}"
pr_title="${title} (Automated PR)"
existing_pr="$(gh pr list --head "${pr_branch}" --json number --jq '.[].number')"
git commit -m "${title}"
Expand All @@ -137,7 +137,14 @@ jobs:
fi
if [[ $existing_pr ]]; then
existing_title="$(gh pr view "${existing_pr}" --json title --jq .title)"
gh pr edit "${existing_pr}" --title "${pr_title}" --body "${body}"
# Use Github's API directly instead of using `gh edit`.
# The latter internally queries all fields of the PR which leads to
# a permission error as the workflow does not have access to
# organization projects:
gh api --silent -H "Accept: application/vnd.github+json" --method PATCH \
Comment thread
pljones marked this conversation as resolved.
"/repos/${GITHUB_REPOSITORY}/pulls/${existing_pr}" \
-f title="${pr_title}" \
-f body="${body}"
if [[ "${existing_title}" != "${pr_title}" ]]; then
# If the title changed, this implies that we are updating the PR for a different version
# (and not just rebasing it). Therefore, leave a comment to make that transparent:
Expand Down