WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 09667e0

Browse files
Wei WengWei Weng
authored andcommitted
try again
Signed-off-by: Wei Weng <[email protected]>
1 parent bb34ab8 commit 09667e0

File tree

1 file changed

+28
-50
lines changed

1 file changed

+28
-50
lines changed

.github/workflows/backport.yml

Lines changed: 28 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -110,61 +110,39 @@ jobs:
110110
run: |
111111
git push origin $BRANCH_NAME
112112
113-
- name: Create Pull Request
113+
- name: Output PR information
114114
if: steps.commits.outputs.has_changes == 'true' && steps.merge.outputs.merge_status == 'success'
115-
env:
116-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117115
run: |
118-
# Prepare PR body
119-
cat > /tmp/pr_body.md <<'EOF'
120-
## Backport from upstream (cncf/main)
121-
122-
This PR backports changes from the upstream repository (kubefleet-dev/kubefleet) to our fork.
123-
124-
### Changes included
125-
126-
The following commits are included in this backport:
127-
128-
```
129-
EOF
130-
131-
cat /tmp/commit_list.txt >> /tmp/pr_body.md
132-
133-
cat >> /tmp/pr_body.md <<'EOF'
134-
```
135-
136-
### Automated changes
137-
138-
- ✅ Merged with `-X theirs` strategy
139-
- ✅ Updated module paths: `github.com/kubefleet-dev/kubefleet` → `go.goms.io/fleet`
140-
EOF
141-
116+
echo "=========================================="
117+
echo "Backport branch created successfully!"
118+
echo "=========================================="
119+
echo ""
120+
echo "Branch: $BRANCH_NAME"
121+
echo "URL: https://github.com/Azure/fleet/tree/$BRANCH_NAME"
122+
echo ""
123+
echo "To create a PR, visit:"
124+
echo "https://github.com/Azure/fleet/compare/main...$BRANCH_NAME"
125+
echo ""
126+
echo "=========================================="
127+
echo "PR Title:"
128+
echo "=========================================="
129+
echo "chore: backport changes from cncf/main ($(date +%Y-%m-%d))"
130+
echo ""
131+
echo "=========================================="
132+
echo "PR Description:"
133+
echo "=========================================="
134+
cat /tmp/commit_list.txt
135+
echo ""
136+
echo "---"
137+
echo ""
138+
echo "Automated changes:"
139+
echo "- ✅ Merged with \`-X theirs\` strategy"
140+
echo "- ✅ Updated module paths: \`github.com/kubefleet-dev/kubefleet\` → \`go.goms.io/fleet\`"
142141
if [ "${{ steps.merge.outputs.reviewable_status }}" == "success" ]; then
143-
echo "- ✅ Ran \`make reviewable\` successfully" >> /tmp/pr_body.md
142+
echo "- ✅ Ran \`make reviewable\` successfully"
144143
else
145-
echo "- ⚠️ \`make reviewable\` had issues - manual review needed" >> /tmp/pr_body.md
144+
echo "- ⚠️ \`make reviewable\` had issues - manual review needed"
146145
fi
147-
148-
cat >> /tmp/pr_body.md <<'EOF'
149-
150-
### Review notes
151-
152-
Please review the changes carefully, especially:
153-
- Any merge conflicts that were resolved automatically
154-
- Module path replacements
155-
- Build and test results
156-
157-
---
158-
*This PR was automatically created by the backport workflow*
159-
EOF
160-
161-
# Create PR
162-
gh pr create \
163-
--title "chore: backport changes from cncf/main ($(date +%Y-%m-%d))" \
164-
--body-file /tmp/pr_body.md \
165-
--base "main" \
166-
--head "$BRANCH_NAME" \
167-
--label "github_actions"
168146
169147
- name: Handle merge conflicts
170148
if: steps.commits.outputs.has_changes == 'true' && steps.merge.outputs.merge_status == 'conflict'

0 commit comments

Comments
 (0)