mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-28 08:22:24 +00:00
Merge pull request #1787 from PR0M3TH3AN/fix-ci-upstream-branch-check-239447602134480452
fix(ci): prevent failure when upstream branch is missing
This commit is contained in:
1 file changed
+5
-5
@@ -36,12 +36,12 @@ jobs:
|
||||
|
||||
- name: Verify upstream branch and diff
|
||||
run: |
|
||||
if ! git rev-parse --verify upstream/${{ github.base_ref }} >/dev/null 2>&1; then
|
||||
echo "::error::Branch upstream/${{ github.base_ref }} not found."
|
||||
exit 1
|
||||
if git ls-remote --heads upstream "${{ github.base_ref }}" | grep "${{ github.base_ref }}" > /dev/null; then
|
||||
git fetch upstream "${{ github.base_ref }}"
|
||||
git diff --name-only upstream/${{ github.base_ref }}...HEAD
|
||||
else
|
||||
echo "::warning::Branch upstream/${{ github.base_ref }} not found. Skipping diff."
|
||||
fi
|
||||
# Verify we can diff against it
|
||||
git diff --name-only upstream/${{ github.base_ref }}...HEAD
|
||||
|
||||
- name: Run Agent Review
|
||||
env:
|
||||
|
||||
Reference in new issue
Block a user