Ensure pull request number is int
Currently manual enqueue of github pull requests to gate pipelines is broken because the pull request number can be of type string instead of int which breaks the graphql query. To fix this centrally force the pull request number to int in _getChange in order to prevent this and potential similar side effects of str vs. int. Change-Id: I0ad241e0308feb60b173182375f04313b008dce6
This commit is contained in:
parent
ba94d07e8a
commit
b79a83f323
|
@ -1200,6 +1200,10 @@ class GithubConnection(BaseConnection):
|
|||
|
||||
def _getChange(self, project, number, patchset=None, refresh=False,
|
||||
event=None):
|
||||
# Note(tobiash): We force the pull request number to int centrally here
|
||||
# because it can originate from different sources (github event, manual
|
||||
# enqueue event) where some might just parse the string and forward it.
|
||||
number = int(number)
|
||||
key = (project.name, number, patchset)
|
||||
change = self._change_cache.get(key)
|
||||
if change and not refresh:
|
||||
|
|
Loading…
Reference in New Issue