ome / scc

OME tools for managing the Git(Hub) workflow
https://pypi.org/project/scc/
GNU General Public License v2.0
0 stars 15 forks source link

Quick fix for missing field #240

Closed joshmoore closed 5 years ago

joshmoore commented 5 years ago

A newly forked repository by @olatarkowska led to the following error:

  File ".../site-packages/scc/git.py", line 1935, in get_merge_remotes
    if repo.private:
AttributeError: 'NoneType' object has no attribute 'private'
manics commented 5 years ago

AttributeError: 'NoneType' object has no attribute 'private'

Doesn't that mean repo was None?

sbesson commented 5 years ago

In this specific case, it looks like the GitHub PullRequest API returns null for the head repo - see https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/5936. The expectation is that this API will return the head repository - see https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/5900. This might have been caused by a deletion of the fork followed by a reforking.

My concern with this situation is that we might propagate the AttributeError since the library will not know which remote should be fetched and merged.

joshmoore commented 5 years ago

Doesn't that mean repo was None?

~You're right, but hasattr is None safe.~ Duh.

My concern with this situation is that we might propagate the AttributeError since the library will not know which remote should be fetched and merged.

My hope was mostly to get a (green?) branch that I could point jenkins for testing but have been sidelined today.

joshmoore commented 5 years ago

Build is green. Merging and pushing out a 0.10.2 to see if I can get jenkins green. If we need to do a 0.10.3 later today, we can.