fleet(github): WS-02 add runner prerequisites for fleet pipeline#6
Merged
fleet(github): WS-02 add runner prerequisites for fleet pipeline#6
Conversation
Add 6 new runner methods required by the fleet pipeline:
- mark_pr_ready: GraphQL mutation to remove draft status from a PR;
REST has no endpoint for this, so a private graphql_connection
helper builds a separate Faraday connection to /graphql
- get_tree: fetch recursive repo file tree via Git Trees API
- get_file_content: fetch a single file via Contents API with optional ref
- list_all_pull_request_files: paginated replacement that collects all
pages (100/page) until exhausted; existing list_pull_request_files
(single-page, cached) is preserved for backward compat
- list_pull_request_review_comments: GET /pulls/{n}/comments for inline
code review feedback (distinct from issue comments)
- list_pull_request_commits: simplified version (per_page: 100, no
cache) replacing the cached/paged variant; fleet validator needs
fresh data to verify head SHA before review
Also adds fleet contract verification specs to labels_spec confirming
add_labels_to_issue(issue_number:) as the correct fleet call site.
259 examples, 0 failures. 0 rubocop offenses.
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.
Summary
lex-githubrequired by the fleet pipeline (WS-02 fromdocs/work/ideas/fleet-plans/03-lex-github-prereqs.md)New Methods
mark_pr_readyPullRequestsmarkPullRequestAsReadymutationget_treeRepositoriesGET /repos/{owner}/{repo}/git/trees/{sha}get_file_contentContentsGET /repos/{owner}/{repo}/contents/{path}list_all_pull_request_filesPullRequestsGET /pulls/{n}/files(100/page, all pages)list_pull_request_review_commentsPullRequestsGET /pulls/{n}/comments(inline review comments)list_pull_request_commitsPullRequestsGET /pulls/{n}/commits(per_page: 100, no cache)Note:
list_pull_request_commitsreplaces the previous cached/paged variant with a simpler version suitable for the fleet validator's stale diff guard (needs fresh data). The originallist_pull_request_files(single-page, cached) is preserved alongside the newlist_all_pull_request_files.Design Amendments
Includes the Design Amendment from R3-R7 adversarial review:
list_pull_request_review_commentsfor the fleet validator to check for unresolved human/Copilot review comments.Also adds fleet contract verification specs to
labels_spec.rbconfirmingadd_labels_to_issue(issue_number:)is the correct call site (notadd_labels(number:)).Test Plan
bundle exec rspec)bundle exec rubocop)