Skip to content

Commit f36e6be

Browse files
authored
Fix consistency review PR delta detection (#2018)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 107c6541-f2ca-4f5b-b7f5-9cd70eab5844
1 parent 5ca48b1 commit f36e6be

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/sdk-consistency-review.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/sdk-consistency-review.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,19 @@ When a pull request modifies any SDK client code, review it to ensure:
7979

8080
## Review Process
8181

82-
1. **Identify the changed SDK(s)**: Determine which language implementation(s) are modified in this PR
83-
2. **Analyze the changes**: Understand what feature/fix is being implemented
84-
3. **Cross-reference other SDKs**: Check if the equivalent functionality exists in other language implementations:
82+
1. **Get the authoritative PR delta**:
83+
- Call `pull_request_read` with `method: get_files` for the PR, paginating until all changed files are retrieved
84+
- Call `pull_request_read` with `method: get_diff` for the PR
85+
- Treat these GitHub API responses as the only authoritative source of which changes belong to the PR, including when the PR head is a merge commit
86+
- Base every claim about what the PR adds or modifies on the API diff; use the local checkout only for surrounding context and cross-SDK comparison
87+
- Never infer the PR base from `HEAD^`, merge-parent ordering, recent commits, or local branch refs
88+
- If the API file list or diff cannot be retrieved, call `missing_data` and stop; do not substitute an inferred local `git diff` range
89+
2. **Identify the changed SDK(s)**: Determine which language implementation(s) are modified in the authoritative PR delta
90+
3. **Analyze the changes**: Understand what feature/fix is being implemented from the authoritative PR delta
91+
4. **Cross-reference other SDKs**: Check if the equivalent functionality exists in other language implementations:
8592
- Read the corresponding files in other SDK directories
8693
- Compare method signatures, behavior, and documentation
87-
4. **Report findings**: If inconsistencies are found:
94+
5. **Report findings**: If inconsistencies are found:
8895
- Use `create-pull-request-review-comment` to add inline comments on specific lines where changes should be made
8996
- Use `add-comment` to provide a summary of cross-SDK consistency findings
9097
- Be specific about which SDKs need updates and what changes would bring them into alignment

0 commit comments

Comments
 (0)