~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/externalbugtracker/github.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2019-04-16 09:13:27 UTC
  • mfrom: (18926.1.1 github-use-issue-number)
  • Revision ID: launchpad@pqm.canonical.com-20190416091327-3mggdav2awe8giu4
[r=twom][bug=1824728] Expect the upstream bug ID in the "number"
 field of GitHub issue objects, not the "id" field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2016-2018 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2016-2019 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
"""GitHub ExternalBugTracker utility."""
183
183
        for remote_bug in self._getCollection(page):
184
184
            # We're only interested in the bug if it's one of the ones in
185
185
            # bug_ids.
186
 
            if remote_bug["id"] not in bug_ids:
 
186
            if remote_bug["number"] not in bug_ids:
187
187
                continue
188
 
            bugs[remote_bug["id"]] = remote_bug
189
 
            self.cached_bugs[remote_bug["id"]] = remote_bug
 
188
            bugs[remote_bug["number"]] = remote_bug
 
189
            self.cached_bugs[remote_bug["number"]] = remote_bug
190
190
        return bugs
191
191
 
192
192
    def getRemoteImportance(self, bug_id):