File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 4646 - name : Get commit information
4747 id : commit-info
4848 run : |
49+ # Fetch staging branch
50+ git fetch origin staging:staging || echo "Staging branch not found"
51+
4952 # Get the latest commits from develop that aren't in staging
50- COMMITS=$(git log --pretty=format:"- %s (%h)" origin/staging..HEAD | head -20)
51- COMMIT_COUNT=$(git rev-list --count origin/staging..HEAD)
53+ if git rev-parse --verify origin/staging >/dev/null 2>&1; then
54+ COMMITS=$(git log --pretty=format:"- %s (%h)" origin/staging..HEAD | head -20)
55+ COMMIT_COUNT=$(git rev-list --count origin/staging..HEAD)
56+ else
57+ COMMITS=$(git log --pretty=format:"- %s (%h)" HEAD | head -20)
58+ COMMIT_COUNT=$(git rev-list --count HEAD)
59+ fi
5260
5361 # Escape for GitHub Actions output
5462 COMMITS="${COMMITS//'%'/'%25'}"
You can’t perform that action at this time.
0 commit comments