api.views: add try push handover functionality (bug 2002566)#748
api.views: add try push handover functionality (bug 2002566)#748
Conversation
|
View this pull request in Lando to land it once approved. |
6c48e2b to
9af2c90
Compare
57bb01e to
717edd9
Compare
b2e9d18 to
6c55a61
Compare
52b5e9a to
6f7a47b
Compare
851f024 to
04b776f
Compare
10cb656 to
dca860f
Compare
589ca64 to
dfc58bd
Compare
dca860f to
5c08094
Compare
shtrom
left a comment
There was a problem hiding this comment.
A couple of small nits, but this is looking good to me.
| patch_data = { | ||
| "author_name": author_name, | ||
| "author_email": author_email, | ||
| "commit_message": pull_request.commit_message, | ||
| "timestamp": int(datetime.now().timestamp()), | ||
| } |
There was a problem hiding this comment.
note for later: We've been building this often enough, we should make it a method of the PullRequest.
dfc58bd to
8b10be0
Compare
shtrom
left a comment
There was a problem hiding this comment.
lgtm. As a nit, I'd rather not change the name of scm.get_diff_from_patches, but we're good to go in otherwise.
|
|
||
| @detect_patch_conflict | ||
| def get_diff_from_patches(self, patches: str) -> str: | ||
| def add_diff_from_patches(self, patches: str) -> str: |
There was a problem hiding this comment.
What motivates the change in name? We do a git add in the working directory, but ultimately this is transient, as it's only for the purpose of returning a diff string to the caller.
8b10be0 to
dc151a8
Compare
| data = { | ||
| "parameters": { | ||
| "optimize_target_tasks": True, | ||
| "target_tasks_method": "codereview", |
There was a problem hiding this comment.
If this firefox patch is approved, you'll be able to pass all the kwargs in try_task_config parameter.
Your payload should look like:
data {
"parameters": {
"optimize_target_tasks": true,
"target_tasks_method": "codereview",
"try_mode": "try_task_config",
"try_task_config": { f"github_{k}": v for k, v in kwargs.items()}
}
},
"version": 2
}There was a problem hiding this comment.
Ok, I am going to move these changes to their own PR so that this one can be merged before the schema is finalized. Will update with your suggestion in that other PR.
- add functionality that adds try_task_config.json file - update landing worker to process handover jobs - add PullRequestTryLintAPIView - add LandingJob.handover_repo field and migrations - add LandingJob.is_handed_over field and migrations - add Repo.is_try helper method
537201b to
f194760
Compare
- add functionality that adds try_task_config.json file - update landing worker to process handover jobs - add PullRequestTryLintAPIView - add LandingJob.handover_repo field and migrations - add LandingJob.is_handed_over field and migrations - add Repo.is_try helper method Pull request: #748
|
Pull request closed by commit f8c53f3 |
Uh oh!
There was an error while loading. Please reload this page.