Skip to content

Commit 55316e2

Browse files
committed
Update workflow steps to include Copilot CLI version update and README modification
1 parent a68f5b0 commit 55316e2

1 file changed

Lines changed: 46 additions & 17 deletions

File tree

.github/prompts/agentic-merge-upstream.prompt.md

Lines changed: 46 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ Before making any changes, **read and understand the existing Java SDK implement
1616
## Workflow Overview
1717

1818
1. Create a new branch from main
19-
2. Clone upstream repository
20-
3. Analyze diff since last merge
21-
4. Apply changes to Java SDK (commit as you go)
22-
5. Test and fix issues
23-
6. Update documentation
24-
7. Push branch to remote for Pull Request review
19+
2. Update Copilot CLI to latest version
20+
3. Update README with minimum CLI version requirement
21+
4. Clone upstream repository
22+
5. Analyze diff since last merge
23+
6. Apply changes to Java SDK (commit as you go)
24+
7. Test and fix issues
25+
8. Update documentation
26+
9. Push branch to remote for Pull Request review
2527

2628
---
2729

@@ -42,7 +44,32 @@ echo "Created branch: $BRANCH_NAME"
4244

4345
**Important:** All changes will be committed to this branch as you work. This allows for proper review via Pull Request.
4446

45-
## Step 2: Clone Upstream Repository
47+
## Step 2: Update Copilot CLI
48+
49+
Update the locally installed GitHub Copilot CLI to the latest version:
50+
51+
```bash
52+
copilot update
53+
```
54+
55+
After updating, capture the new version and update the README.md to reflect the minimum version requirement:
56+
57+
```bash
58+
# Get the current version
59+
CLI_VERSION=$(copilot --version | head -n 1 | awk '{print $NF}')
60+
echo "Updated Copilot CLI to version: $CLI_VERSION"
61+
```
62+
63+
Update the Requirements section in `README.md` to specify the minimum CLI version requirement. Locate the line mentioning "GitHub Copilot CLI installed" and update it to include the version information.
64+
65+
Commit this change before proceeding:
66+
67+
```bash
68+
git add README.md
69+
git commit -m "Update Copilot CLI minimum version requirement to $CLI_VERSION"
70+
```
71+
72+
## Step 3: Clone Upstream Repository
4673

4774
Clone the official Copilot SDK repository into a temporary folder:
4875

@@ -52,7 +79,7 @@ TEMP_DIR=$(mktemp -d)
5279
git clone --depth=100 "$UPSTREAM_REPO" "$TEMP_DIR/copilot-sdk"
5380
```
5481

55-
## Step 3: Read Last Merge Commit
82+
## Step 4: Read Last Merge Commit
5683

5784
Read the commit hash from `.lastmerge` file in the Java SDK root:
5885

@@ -61,7 +88,7 @@ LAST_MERGE_COMMIT=$(cat .lastmerge)
6188
echo "Last merged commit: $LAST_MERGE_COMMIT"
6289
```
6390

64-
## Step 4: Analyze Changes
91+
## Step 5: Analyze Changes
6592

6693
Generate a diff between the last merged commit and HEAD of main:
6794

@@ -78,7 +105,7 @@ Focus on analyzing:
78105
- `docs/` - Documentation updates
79106
- `sdk-protocol-version.json` - Protocol version changes
80107

81-
## Step 5: Identify Changes to Port
108+
## Step 6: Identify Changes to Port
82109

83110
For each change in the upstream diff, determine:
84111

@@ -103,7 +130,7 @@ For each change in the upstream diff, determine:
103130

104131
> **⚠️ Important:** When adding new documentation pages, always update `src/site/site.xml` to include them in the navigation menu.
105132
106-
## Step 6: Apply Changes to Java SDK
133+
## Step 7: Apply Changes to Java SDK
107134

108135
When porting changes:
109136

@@ -167,7 +194,7 @@ Follow the existing Java SDK patterns:
167194
- **Match the style of surrounding code** - Consistency with existing code is more important than upstream patterns
168195
- **Prefer existing abstractions** - If the Java SDK already solves a problem differently than .NET, keep the Java approach
169196

170-
## Step 7: Format and Run Tests
197+
## Step 8: Format and Run Tests
171198

172199
After applying changes, format the code and run the test suite:
173200

@@ -193,7 +220,7 @@ mvn clean test
193220
- **Null handling**: Add null checks where C# had nullable types
194221
- **JSON serialization**: Verify Jackson annotations are correct
195222

196-
## Step 8: Build the Package
223+
## Step 9: Build the Package
197224

198225
Once tests pass, build the complete package:
199226

@@ -206,7 +233,7 @@ Verify:
206233
- No warnings (if possible)
207234
- JAR file is generated in `target/`
208235

209-
## Step 9: Update Documentation
236+
## Step 10: Update Documentation
210237

211238
Review and update documentation as needed:
212239

@@ -215,7 +242,7 @@ Review and update documentation as needed:
215242
3. **Javadoc**: Add/update Javadoc comments for new/changed public APIs
216243
4. **CHANGELOG**: (if exists) Add entry for the changes
217244

218-
## Step 10: Update Last Merge Reference
245+
## Step 11: Update Last Merge Reference
219246

220247
Update the `.lastmerge` file with the new HEAD commit and commit this change:
221248

@@ -230,7 +257,7 @@ git add .lastmerge
230257
git commit -m "Update .lastmerge to $NEW_COMMIT"
231258
```
232259

233-
## Step 11: Push Branch and Create Pull Request
260+
## Step 12: Push Branch and Create Pull Request
234261

235262
Push the branch to remote so the changes can be reviewed via Pull Request:
236263

@@ -247,7 +274,7 @@ echo "Create a Pull Request to review and merge the changes."
247274
2. A summary of the changes that were ported
248275
3. Instructions to create a Pull Request comparing the branch against `main`
249276

250-
## Step 12: Final Review
277+
## Step 13: Final Review
251278

252279
Before finishing:
253280

@@ -262,6 +289,8 @@ Before finishing:
262289
## Checklist
263290

264291
- [ ] New branch created from `main`
292+
- [ ] Copilot CLI updated to latest version
293+
- [ ] README.md updated with minimum CLI version requirement
265294
- [ ] Upstream repository cloned
266295
- [ ] Diff analyzed between `.lastmerge` commit and HEAD
267296
- [ ] New features/fixes identified

0 commit comments

Comments
 (0)