Skip to content

Commit 0bc541c

Browse files
Merge pull request #848 from roboflow/fix/make-new-mergable-workflow-to-succeed-if-merging-to-main
Make check_if_branch_is_mergeable.yml to succeed if merging to main
2 parents 660d5cf + bd0e45d commit 0bc541c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/check_if_branch_is_mergeable.yml

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
- name: Check and store mergable state
3131
id: mergeable_check
3232
run: |
33+
if [ -z "${{ github.event.pull_request.head.sha }}" ]; then
34+
echo "Merging to main";
35+
exit 0;
36+
fi
3337
echo "Check if main is ancestor of ${{ github.event.pull_request.head.sha }} (branch HEAD)";
3438
if $(git merge-base --is-ancestor ${{ env.main_sha }} ${{ github.event.pull_request.head.sha }}); then
3539
echo "Branch is mergeable";

0 commit comments

Comments
 (0)