Add overlap-warning workflow for files shared with moveit_pro_empty_ws#635
Open
JWhitleyWork wants to merge 1 commit into
Open
Add overlap-warning workflow for files shared with moveit_pro_empty_ws#635JWhitleyWork wants to merge 1 commit into
JWhitleyWork wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub Actions workflow that warns reviewers when a PR touches files that also exist in the upstream moveit_pro_empty_ws repository, using a sticky PR comment that is created, updated, or deleted on subsequent pushes.
Changes:
- New workflow
warn-empty-ws-overlap.yamltriggered onpull_requestevents. - Uses
actions/github-scriptto list changed files, fetch upstream's recursive tree via the GitHub API, and intersect the two path sets. - Manages a single sticky comment keyed by an HTML marker, and emits a
core.warningon overlap or on truncated upstream tree responses.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Files that exist in both
moveit_pro_empty_ws(parent) andmoveit_pro_example_ws(fork) can drift when a change is made only to the fork. Reviewers don't always notice during PR review, and the divergence is usually discovered later during an upstream merge — at which point the fix is much more disruptive.Alternatives considered
moveit_pro_empty_ws. Rejected: introduces another moving part and the manifest goes stale between syncs.git clonemoveit_pro_empty_wsinside the action and diff locally. Rejected: slower, requires auth handling for a private/internal repo, and is overkill — we only need a path list, not file contents.moveit_pro_empty_ws's tree from the GitHub API at PR time. A single recursivegit/treescall returns every path, the data is always current, and no checkout of either repo is needed.Approach
One
actions/github-script@v9.0.0step. Noactions/checkout. The script:pulls.listFiles(paginated, ignoring deletions).moveit_pro_empty_ws's default-branch tree viagit.getTreewithrecursive: true.<!-- empty-ws-overlap-warning -->), so subsequent pushes update one comment instead of spamming the PR. If a later push removes the overlap entirely, the comment is deleted.core.warningif the upstream tree response is ever truncated (current size is well under GitHub's ~100k-entry limit, so this is precautionary).Tradeoffs
GITHUB_TOKEN. This works because both repos are in the same org and visible to the workflow. Ifmoveit_pro_empty_wsaccess ever tightens, the token can be swapped for a fine-grained PAT secret without other changes.actions/checkout@<SHA> # v<version>style used elsewhere inci.yaml.