@@ -31,20 +31,27 @@ jobs:
31
31
# This gives the workflow access to the repository contents
32
32
- name : Checkout repository
33
33
uses : actions/checkout@v4
34
+ with :
35
+ fetch-depth : 0 # Fetch all history for proper branch comparison
34
36
35
37
# Step 1.5: Ensure we have the latest develop branch and check if there are differences
36
38
- name : Fetch develop branch
37
- run : git fetch origin develop:develop
39
+ run : |
40
+ git fetch origin develop:develop
41
+ git branch -a
42
+ echo "Current branch: $(git branch --show-current)"
43
+ echo "Develop branch commit: $(git rev-parse develop)"
44
+ echo "Main branch commit: $(git rev-parse main)"
38
45
39
46
- name : Check for differences between main and develop
40
47
id : check_diff
41
48
run : |
42
- git diff --quiet main develop || echo "has_diff=true" >> $GITHUB_OUTPUT
43
- echo "Checking differences between main and develop branches..."
44
49
if git diff --quiet main develop; then
45
50
echo "No differences found between main and develop branches."
51
+ echo "has_diff=false" >> $GITHUB_OUTPUT
46
52
else
47
53
echo "Found differences between main and develop branches."
54
+ echo "has_diff=true" >> $GITHUB_OUTPUT
48
55
fi
49
56
50
57
# Step 2: Create an automated pull request for the backmerge
76
83
- name : PR Creation Status
77
84
if : always()
78
85
run : |
86
+ echo "has_diff value: ${{ steps.check_diff.outputs.has_diff }}"
79
87
if [ "${{ steps.check_diff.outputs.has_diff }}" != 'true' ]; then
80
88
echo "No PR created because there are no differences between main and develop branches."
81
89
else
82
90
echo "PR creation attempted. If no PR was created, check GitHub token permissions."
91
+ echo "GitHub token permissions: ${{ toJson(github.token_permissions) }}"
83
92
fi
0 commit comments