Skip to content

Commit 5840e12

Browse files
committed
fix: branch2obs.sh: run workflows even if local repo has multiple remotes
add an explicit -R/--repo option to gh, like the other invocations do, otherwise it fails with: > Starting GitHub Action obs-staging-live.yml... > X No default remote repository has been set. To learn more about the default repository, run: gh repo set-default --help > please run `gh repo set-default` to select a default remote repository.
1 parent 6a362d8 commit 5840e12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

devel/branch2obs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,14 @@ workflows=(obs-staging-live.yml obs-staging-products.yml obs-staging-rust.yml ob
236236
if git ls-remote --exit-code --heads origin "$BRANCH" > /dev/null; then
237237
for workflow in "${workflows[@]}"; do
238238
echo "Starting GitHub Action $workflow..."
239-
gh workflow run "$workflow" --ref "$BRANCH"
239+
gh -R "$repo_slug" workflow run "$workflow" --ref "$BRANCH"
240240
done
241241
else
242242
echo "After creating the remote branch trigger the submission actions on the web"
243243
echo "or run these commands:"
244244
echo
245245
for workflow in "${workflows[@]}"; do
246-
echo " gh workflow run \"$workflow\" --ref \"$BRANCH\""
246+
echo " gh -R \"$repo_slug\" workflow run \"$workflow\" --ref \"$BRANCH\""
247247
done
248248
fi
249249

0 commit comments

Comments
 (0)