Skip to content

Commit 5345510

Browse files
committed
Close stale sync PRs in reference-impl-sync workflow
- Delete redundant non-agentic reference-impl-sync.yml workflow - Add close-pull-request safe-output to reference-impl-sync.md - Add pull_requests toolset and pull-requests:read permission - Recompile lock file
1 parent 2af2399 commit 5345510

3 files changed

Lines changed: 46 additions & 201 deletions

File tree

.github/workflows/reference-impl-sync.lock.yml

Lines changed: 35 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/reference-impl-sync.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ permissions:
1111
contents: read
1212
actions: read
1313
issues: read
14+
pull-requests: read
1415

1516
network:
1617
allowed:
@@ -19,7 +20,7 @@ network:
1920

2021
tools:
2122
github:
22-
toolsets: [context, repos, issues]
23+
toolsets: [context, repos, issues, pull_requests]
2324

2425
safe-outputs:
2526
create-issue:
@@ -37,6 +38,9 @@ safe-outputs:
3738
name: "copilot"
3839
model: "claude-opus-4.6"
3940
target: "*"
41+
close-pull-request:
42+
target: "*"
43+
max: 10
4044
noop:
4145
report-as-issue: false
4246
---
@@ -78,14 +82,16 @@ Go to Step 3b.
7882

7983
1. Search for any open issues with the `reference-impl-sync` label using the GitHub MCP tools.
8084
2. If there are open `reference-impl-sync` labeled issues, close each one using the `close_issue` safe-output tool with a comment: "No new reference implementation changes detected. The Java SDK is up to date. Closing."
81-
3. Call the `noop` safe-output tool with message: "No new reference implementation changes since last merge (<LAST_MERGE>)."
82-
4. **Stop here.** Do not proceed further.
85+
3. Search for any open pull requests whose head branch starts with `copilot/reference-impl`. Close each one using the `close_pull_request` safe-output tool with a comment: "Superseded — the Java SDK is up to date with the reference implementation. Closing stale sync PR."
86+
4. Call the `noop` safe-output tool with message: "No new reference implementation changes since last merge (<LAST_MERGE>)."
87+
5. **Stop here.** Do not proceed further.
8388

8489
### Step 3b: Changes detected
8590

8691
1. Search for any open issues with the `reference-impl-sync` label using the GitHub MCP tools.
8792
2. Close each existing open `reference-impl-sync` issue using the `close_issue` safe-output tool with a comment: "Superseded by a newer reference implementation sync check."
88-
3. Create a new issue using the `create_issue` safe-output tool with:
93+
3. Search for any open pull requests whose head branch starts with `copilot/reference-impl`. Close each one using the `close_pull_request` safe-output tool with a comment: "Superseded by a newer reference implementation sync issue. Closing stale sync PR."
94+
4. Create a new issue using the `create_issue` safe-output tool with:
8995
- **Title:** `Reference Implementation sync: <COMMIT_COUNT> new commits (<YYYY-MM-DD>)`
9096
- **Body:** Include the following information:
9197
```
@@ -112,7 +118,7 @@ Go to Step 3b.
112118
❌❌Do NOT update .lastmerge manually — the finish script does this.❌❌
113119
❌❌Do NOT skip the finish script — it syncs codegen versions and updates .lastmerge.❌❌
114120
```
115-
4. After creating the issue, use the `assign_to_agent` safe-output tool to assign Copilot to the newly created issue.
121+
5. After creating the issue, use the `assign_to_agent` safe-output tool to assign Copilot to the newly created issue.
116122
117123
## Important constraints
118124

0 commit comments

Comments
 (0)