github: pull requests pilot (bug 1989635)#631
Merged
Conversation
1ede676 to
7c1d6a8
Compare
3d9712a to
f51d72f
Compare
09353de to
665994d
Compare
- 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
- UI changes to support the new pull request page
Co-authored-by: Zeid <zeid@mozilla.com>
…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>
7a080f1 to
cdb7535
Compare
- file was affected by 5 different commits in pilot stack - to avoid fixing merge conflicts 5 times, fix in one commit
…709) - factor out reusable code that generates warnings and blockers - check blockers before submitting landing job - return 400 if there are still blockers --------- Co-authored-by: Olivier Mehani <omehani@mozilla.com>
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.
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.