forked from solutions-plug/predictIQ
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush_and_create_pr.sh
More file actions
executable file
·75 lines (62 loc) · 2.71 KB
/
push_and_create_pr.sh
File metadata and controls
executable file
·75 lines (62 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
# Script to push branch and create PR for Issue #14
# Run this from the project root: bash push_and_create_pr.sh
set -e
echo "╔══════════════════════════════════════════════════════════════╗"
echo "║ Pushing Issue #14 Branch and Creating Pull Request ║"
echo "╚══════════════════════════════════════════════════════════════╝"
echo ""
# Check if we're on the correct branch
CURRENT_BRANCH=$(git branch --show-current)
EXPECTED_BRANCH="features/issue-14-Permissioned-Creation-Tiered-Market-Levels"
if [ "$CURRENT_BRANCH" != "$EXPECTED_BRANCH" ]; then
echo "❌ Error: Not on the correct branch"
echo " Current: $CURRENT_BRANCH"
echo " Expected: $EXPECTED_BRANCH"
exit 1
fi
echo "✅ On correct branch: $CURRENT_BRANCH"
echo ""
# Show commits to be pushed
echo "📦 Commits to be pushed:"
git log --oneline -2
echo ""
# Push the branch
echo "🚀 Pushing branch to origin..."
git push origin "$CURRENT_BRANCH"
echo ""
echo "✅ Branch pushed successfully!"
echo ""
# Check if gh CLI is available
if command -v gh &> /dev/null; then
echo "📝 GitHub CLI detected. Creating PR..."
echo ""
# Create PR using gh CLI
gh pr create \
--base main \
--title "feat: Permissioned Creation & Tiered Market Levels (Issue #14)" \
--body-file PR_TEMPLATE_ISSUE_14.md \
--label "enhancement" \
--label "breaking-change"
echo ""
echo "✅ Pull Request created successfully!"
else
echo "ℹ️ GitHub CLI not found. Please create PR manually:"
echo ""
echo "1. Visit your repository on GitHub"
echo "2. Click 'Compare & pull request' button"
echo "3. Set base branch to: main (or develop if it exists)"
echo "4. Copy content from PR_TEMPLATE_ISSUE_14.md into PR description"
echo "5. Add labels: enhancement, breaking-change"
echo ""
echo "Or install GitHub CLI: https://cli.github.com/"
fi
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "📚 Documentation files available:"
echo " • IMPLEMENTATION_ISSUE_14.md"
echo " • PR_TEMPLATE_ISSUE_14.md"
echo " • QUICK_REFERENCE_ISSUE_14.md"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "✨ Done!"