Skip to content

Commit

Permalink
Fix reflector-bot merge conflict handling (#4469)
Browse files Browse the repository at this point in the history
The update workflows for dendrite and maghemite are currently failing to
merge main into their respective integration branches. The intended
behavior is that the workflows start by merging main to pick up any new
changes, and overwriting any changes to the `*_openapi_version` files
that had been made on the integration branches with the versions from
main (in the event of a conflict). This gets the integration branch into
a clean spot which it can then apply the update scripts to.

The workflows as is though are not correctly passing the list of paths
for which the the main branch should be preferred. This leaves the
integration branch with a conflict causing the action to fail.

These changes should fix that and allow merges to complete cleanly.

Co-authored-by: reflector[bot] <123+reflector[bot]@users.noreply.github.com>
  • Loading branch information
augustuswm and reflector[bot] authored Nov 20, 2023
1 parent 711a18e commit b337854
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-dendrite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
. ./tools/reflector/helpers.sh
PATHS=("tools")
merge $TARGET_BRANCH $INT_BRANCH ${{ inputs.reflector_user_id }} $PATHS
merge $TARGET_BRANCH $INT_BRANCH ${{ inputs.reflector_user_id }} "${PATHS[@]}"
- name: Update dendrite versions
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-maghemite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
. ./tools/reflector/helpers.sh
PATHS=("tools")
merge $TARGET_BRANCH $INT_BRANCH ${{ inputs.reflector_user_id }} $PATHS
merge $TARGET_BRANCH $INT_BRANCH ${{ inputs.reflector_user_id }} "${PATHS[@]}"
- name: Update maghemite versions
run: |
Expand Down
2 changes: 1 addition & 1 deletion tools/reflector/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function merge {
local TARGET_BRANCH="$1"
local INTEGRATION_BRANCH="$2"
local BOT_ID="$3"
local -n CHECKOUT_PATHS=$4
local CHECKOUT_PATHS=$4

set_reflector_bot "$BOT_ID"

Expand Down

0 comments on commit b337854

Please sign in to comment.