Skip to content

Don't actually create a PR #589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 12 additions & 37 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ jobs:
needs: validate
runs-on: ubuntu-latest
outputs:
pr-number: ${{ steps.create-pr.outputs.pr-number }}
pr-url: ${{ steps.create-pr.outputs.pr-url }}
tag: ${{ steps.tag-release.outputs.tag }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -100,38 +99,12 @@ jobs:
fi

- name: Tag the release
id: tag-release
run: |
TAG="${{ github.event.inputs.tag }}"
git tag -a "${TAG}" -m "Release ${TAG}"
echo "✅ Created tag ${TAG}"

- name: Create Pull Request
id: create-pr
run: |
TAG="${{ github.event.inputs.tag }}"

# Create PR from next to main
PR_URL=$(gh pr create \
--base main \
--head next \
--title "Release ${TAG}" \
--body "This PR contains the changes for release ${TAG}.

**Release checklist:**
- [ ] Review the changes
- [ ] Ensure all tests pass
- [ ] Verify the release notes in the draft release
- [ ] Merge this PR after the release is published

Created by the automated release workflow.")

PR_NUMBER=$(echo "$PR_URL" | sed 's|.*/pull/||')

echo "pr-number=${PR_NUMBER}" >> $GITHUB_OUTPUT
echo "pr-url=${PR_URL}" >> $GITHUB_OUTPUT
echo "✅ Created PR #${PR_NUMBER}: ${PR_URL}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
echo "tag=${TAG}" >> $GITHUB_OUTPUT

- name: Push tag
run: |
Expand Down Expand Up @@ -164,8 +137,7 @@ jobs:
steps:
- name: Release Summary
run: |
TAG="${{ github.event.inputs.tag }}"
PR_URL="${{ needs.release.outputs.pr-url }}"
TAG="${{ needs.release.outputs.tag }}"

echo "## 🎉 Release $TAG has been initiated!"
echo ""
Expand All @@ -174,12 +146,13 @@ jobs:
echo "2. ✏️ Edit the new release, delete the existing notes and click the auto-generate button GitHub provides"
echo "3. ✨ Add a section at the top calling out the main features"
echo "4. 🚀 Publish the release"
echo "5. 🔀 Merge the pull request into main: ${PR_URL}"
echo "6. Post message in #gh-mcp-releases channel in Slack and then share to the other mcp channels"
echo "5. � Create a Pull Request from 'next' to 'main' branch with title 'Release $TAG'"
echo "6. �🔀 Merge the pull request into main"
Copy link
Preview

Copilot AI Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The '�' symbol in the instructions seems to be an encoding error. Consider replacing it with a clear and appropriate symbol or text.

Suggested change
echo "6. �🔀 Merge the pull request into main"
echo "5. 🔄 Create a Pull Request from 'next' to 'main' branch with title 'Release $TAG'"
echo "6. 🔀 Merge the pull request into main"

Copilot uses AI. Check for mistakes.

echo "7. 📢 Post message in #gh-mcp-releases channel in Slack and then share to the other mcp channels"
echo ""
echo "### Resources:"
echo "- 📦 Draft Release: https://github.com/${{ github.repository }}/releases/tag/$TAG"
echo "- 🔄 Pull Request: ${PR_URL}"
echo "- 🔄 Create PR: https://github.com/${{ github.repository }}/compare/main...next"
echo ""
echo "The release process is now ready for your review and completion!"

Expand All @@ -192,11 +165,13 @@ jobs:
2. ✏️ Edit the new release, delete the existing notes and click the auto-generate button GitHub provides
3. ✨ Add a section at the top calling out the main features
4. 🚀 Publish the release
5. 🔀 Merge the pull request into main: [PR #${{ needs.release.outputs.pr-number }}](${PR_URL})
5. � [Create a Pull Request](https://github.com/${{ github.repository }}/compare/main...next) from 'next' to 'main' branch with title 'Release $TAG'
6. �🔀 Merge the pull request into main
7. 📢 Post message in #gh-mcp-releases channel in Slack and then share to the other mcp channels

### Resources:
- 📦 [Draft Release](https://github.com/${{ github.repository }}/releases/tag/$TAG)
- 🔄 [Pull Request](${PR_URL})
- 🔄 [Create PR](https://github.com/${{ github.repository }}/compare/main...next)

The release process is now ready for your review and completion!
EOF
78 changes: 34 additions & 44 deletions .github/workflows/sync-next-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,46 +77,16 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create sync PR
id: create-sync-pr
- name: Provide sync instructions
id: sync-instructions
if: steps.branch-status.outputs.needs-sync == 'true' && steps.existing-pr.outputs.has-existing-pr == 'false'
run: |
BEHIND_COUNT="${{ steps.branch-status.outputs.behind-count }}"
AHEAD_COUNT="${{ steps.branch-status.outputs.ahead-count }}"

# Create PR from main to next
PR_URL=$(gh pr create \
--base next \
--head main \
--title "Sync next branch with main" \
--body "## 🔄 Automated Branch Sync

This PR syncs the \`next\` branch with the latest changes from \`main\`.

### Status:
- **Behind main**: ${BEHIND_COUNT} commits
- **Ahead of main**: ${AHEAD_COUNT} commits

### What to do:
1. 🔍 Review the changes in this PR
2. ✅ Ensure all checks pass
3. 🔀 Merge this PR to sync the \`next\` branch
4. 🗑️ The \`next\` branch will then be ready for new development

> **Note**: This PR was automatically created by the daily branch sync workflow.
> If you have any concerns about these changes, please review them carefully before merging." \
--label "automated" \
--label "sync")

# Extract PR number from URL (e.g., https://github.com/owner/repo/pull/123 -> 123)
PR_NUMBER=$(echo "$PR_URL" | sed 's|.*/pull/||')

echo "pr-number=${PR_NUMBER}" >> $GITHUB_OUTPUT
echo "pr-url=${PR_URL}" >> $GITHUB_OUTPUT

echo "✅ Created sync PR #${PR_NUMBER}: ${PR_URL}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
echo "action-needed=true" >> $GITHUB_OUTPUT
echo "🔄 Next branch needs syncing (${BEHIND_COUNT} commits behind main)"
echo "� Manual PR creation required due to organization policies"
Copy link
Preview

Copilot AI Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The '�' character appears to be a mis-encoded or unintended symbol. Replace it with a proper emoji or text to improve clarity.

Suggested change
echo " Manual PR creation required due to organization policies"
echo "⚠️ Manual PR creation required due to organization policies"

Copilot uses AI. Check for mistakes.


- name: Job Summary
if: always()
Expand All @@ -126,8 +96,7 @@ jobs:
NEEDS_SYNC="${{ steps.branch-status.outputs.needs-sync }}"
HAS_EXISTING_PR="${{ steps.existing-pr.outputs.has-existing-pr }}"
EXISTING_PR="${{ steps.existing-pr.outputs.existing-pr }}"
NEW_PR_URL="${{ steps.create-sync-pr.outputs.pr-url }}"
NEW_PR_NUMBER="${{ steps.create-sync-pr.outputs.pr-number }}"
ACTION_NEEDED="${{ steps.sync-instructions.outputs.action-needed }}"

cat << EOF >> $GITHUB_STEP_SUMMARY
# 🔄 Branch Sync Status
Expand All @@ -146,15 +115,36 @@ jobs:

Please review and merge the existing PR to sync the next branch.
EOF
elif [ -n "$NEW_PR_NUMBER" ]; then
elif [ "$ACTION_NEEDED" = "true" ]; then
cat << EOF >> $GITHUB_STEP_SUMMARY
## ✅ Action Taken:
Created a new sync PR: [#${NEW_PR_NUMBER}](${NEW_PR_URL})
## 📝 Manual Action Required:

The \`next\` branch is ${BEHIND_COUNT} commits behind \`main\` and needs to be synced.

**Please create a pull request manually:**

1. 🌐 [Create PR: main → next](https://github.com/${{ github.repository }}/compare/next...main)
2. 📝 Use title: **"Sync next branch with main"**
3. 📄 Use this description:

\`\`\`markdown
## 🔄 Branch Sync

This PR syncs the \`next\` branch with the latest changes from \`main\`.

### Status:
- **Behind main**: ${BEHIND_COUNT} commits
- **Ahead of main**: ${AHEAD_COUNT} commits

### What to do:
1. 🔍 Review the changes in this PR
2. ✅ Ensure all checks pass
3. 🔀 Merge this PR to sync the \`next\` branch
4. 🗑️ The \`next\` branch will then be ready for new development
\`\`\`

**Next steps:**
1. Review the changes in the PR
2. Ensure all checks pass
3. Merge the PR to sync the next branch
4. 🏷️ Add labels: \`automated\`, \`sync\`
5. ✅ Review and merge when ready
EOF
fi
else
Expand Down
Loading