Bug 1664167 - add before context in jsone_push context#470
Merged
escapewindow merged 6 commits intomozilla-releng:masterfrom Sep 10, 2020
Merged
Bug 1664167 - add before context in jsone_push context#470escapewindow merged 6 commits intomozilla-releng:masterfrom
before context in jsone_push context#470escapewindow merged 6 commits intomozilla-releng:masterfrom
Conversation
MihaiTabara
commented
Sep 10, 2020
| ], | ||
| "payload": { | ||
| "env": { | ||
| "MPD001_BASE_REV": "330ea928b42ff2403fc99cd3e596d13294fe8775", |
Contributor
Author
There was a problem hiding this comment.
@escapewindow can't access the repo, I think I should've put the real value here.
Contributor
There was a problem hiding this comment.
No worries. Let's drop this change.
| # This value could have been taken from `commit_data.parents[0]` too but | ||
| # it is more visible if picked up from `.taskcluster.yml` env vars | ||
| base_prefix = "{}_BASE_REV".format(context.config["source_env_prefix"]) | ||
| before_hash = task["payload"]["env"][base_prefix] |
Contributor
There was a problem hiding this comment.
If I don't change the mpd test file, and I change this to a .get(), it works.
Then if I verify_cot --cot-product mobile --no-check-task --task-type scriptworker --cleanup -- SyfDmaLsR6utrjkL5FmbhA , that succeeds.
escapewindow
approved these changes
Sep 10, 2020
Contributor
escapewindow
left a comment
There was a problem hiding this comment.
\o/ Thank you! Going to bump versions then merge.
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.
For Pul-requests, it reads the
event.pull_request.base.shawhich in CoT is rebuilt from github3's PyPI package's https://github3.readthedocs.io/en/master/api-reference/repos.html?highlight=repository#github3.repos.repo.ShortRepository.pull_request that returns this type of object which in turn behaves like this and has the sha key. Since the github3 python package maps on Github and we use that in CoT, we naturally solve this problem in Pull-requests just by relying on the Github API, indirectly.So we only need to fix this for github-pushes, by adding that in the context.