Skip to content

github: pull requests pilot (bug 1989635)#631

Merged
zzzeid merged 25 commits intomainfrom
zeid/bug-1989635-github-pr-pilot
Nov 24, 2025
Merged

github: pull requests pilot (bug 1989635)#631
zzzeid merged 25 commits intomainfrom
zeid/bug-1989635-github-pr-pilot

Conversation

@zzzeid
Copy link
Copy Markdown
Contributor

@zzzeid zzzeid commented Oct 22, 2025

A collection of pre-approved pull requests merged into the feature branch for this project.

Note: this PR will be "rebased and merged" into main.

@zzzeid zzzeid marked this pull request as ready for review October 27, 2025 14:31
@zzzeid zzzeid force-pushed the zeid/bug-1989635-github-pr-pilot branch 4 times, most recently from 1ede676 to 7c1d6a8 Compare October 28, 2025 20:02
@shtrom shtrom force-pushed the zeid/bug-1989635-github-pr-pilot branch from 3d9712a to f51d72f Compare October 31, 2025 05:39
@zzzeid zzzeid force-pushed the zeid/bug-1989635-github-pr-pilot branch 2 times, most recently from 09353de to 665994d Compare November 6, 2025 20:37
zzzeid and others added 19 commits November 20, 2025 15:16
- add GitHubAPI class
- add GitHubAPIClient class
- move "get token" functionality to GitHubAPI class
- fix failing test_GitSCM_push_get_github_token
- add pull request template
- add pull request view
- add pull request helper class
- add pulls url
- add `PullRequestAPIView.get` endpoint
- add placeholder for `LandingJobAPIView.post` endpoint
- add `serialize` method to `PullRequest` class
- update urls with above
…5) (#607)

- add and update pull request API views
- add Revision.pull_number field
- add pull request functionality to Stack.js
- update pull request template
- add helper methods and properties in github utils
- add methods to open, close, and comment on pull requests
)

- add functionality for commenting on and closing a PR at landing time
- UI changes to support the new pull request page
…95679) (#604)

* add a `GitHub` object allowing to renew tokens, parse URLs, and
generate authenticated URLs
* also add a pre-authenticated `session` attribute to the `GitHubAPI`
object
* utils: move `URL_USERINFO_RE` to const (bug 1995679)
* utils: add basic test for github classes

---------

Co-authored-by: Zeid <2043828+zzzeid@users.noreply.github.com>
Co-authored-by: Zeid <zeid@mozilla.com>
)

* The `GitHubAPIClient`, which is in charge of API interactions, now has
a method to build a full `PullRequest` object.
* At build/construction time, the `PullRequest` is now given a reference
to this client.
* The `PullRequest` uses this client to delegate requests to obtain the
values for the new properties.

---------

Co-authored-by: Zeid <2043828+zzzeid@users.noreply.github.com>
Co-authored-by: Zeid <zeid@mozilla.com>
…1992863) (#627)

This change introduces an API endpoint at
https://lando.test/api/pulls/<REPO>/<PR_NO>/checks which provides
current blockers and warnings for the target PR.

Currently, only blockers based on diffs from commits on the PR are
checked.

For test purposes, it makes wider use of the `MockResponse` object,
making it available as a `mock_response` fixture. To fix an interface
mismatch with the `requests.Response` object, the `json` property is
now a method. Tests have been updated accordingly.

---------

Co-authored-by: Zeid <2043828+zzzeid@users.noreply.github.com>
Co-authored-by: Zeid <zeid@mozilla.com>

---------

 * tests: add global mock_response fixture
 * tests: fix MockResponse.json()
 * github: add PullRequestPatchHelper
 * api/views: add PullRequestChecksAPIView (bug 1992863)
 * PullRequestChecksAPIView: reuse LandingChecks for blockers (bug 1992863)
 * views: use pull_request.author to get email for LandingCheck
 * landing_checks: use chk.name() everywhere
 * github.PullRequestPatchHelper: use PullRequest.author to get author details
 * test_github: add commits support to _github_api_get fixture
 * landing_checks: move CONSTs to their respective classes
The following Phabricator-equivalents blockers are not currently needed, and have been removed from the code:

* PullRequestLatestDiffsBlocker
* PullRequestOpenParentsBlocker
* PullRequestOpenAncestorBlocker
* PullRequestUpliftApprovalBlocker

--------

Co-authored-by: Zeid <zeid@mozilla.com>
Co-authored-by: Zeid <2043828+zzzeid@users.noreply.github.com>

--------
                                                                        
 * github: extend PullRequest (bug 1994570, 1994359)
 * github_checks: port phabricator blockers (bug 1994359)
 * views: use pull_request.author to get email for LandingCheck
 * utils.github: add specialised pr_cache_method decorator
 * test_github: update api fixtures
 * github: add docstring to PR state Enums
 * PullRequest: get labels from PR data without additional request
The following Phabricator-equivalents warnings are not currently needed,
and have been removed from the code:

 * PullRequestSecureRevisionWarning
 * PullRequestDiffWarning

---------

Co-authored-by: Zeid <zeid@mozilla.com>
Co-authored-by: Zeid <2043828+zzzeid@users.noreply.github.com>

---------

 * github_checks: port phabricator warnings (bug 1994570)
 * github_checks: split PullRequestMultipleAuthorsWarning
 * github_checks: inspect jobs for PullRequestPreviouslyLandedWarning
 * github_checks: remove PullRequestSecureRevisionWarning
 * github_checks: remove PullRequestDiffWarning
Co-authored-by: Zeid <zeid@mozilla.com>
Co-authored-by: Zeid <2043828+zzzeid@users.noreply.github.com>
@zzzeid zzzeid force-pushed the zeid/bug-1989635-github-pr-pilot branch from 7a080f1 to cdb7535 Compare November 20, 2025 20:54
- file was affected by 5 different commits in pilot stack
- to avoid fixing merge conflicts 5 times, fix in one commit
Copy link
Copy Markdown
Member

@shtrom shtrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

She'll be right, mate.

@zzzeid zzzeid merged commit b722a60 into main Nov 24, 2025
1 check passed
@zzzeid zzzeid deleted the zeid/bug-1989635-github-pr-pilot branch November 24, 2025 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants