8000 Calling refresh() always pulls content from master branch · Issue #672 · sigmavirus24/github3.py · GitHub
[go: up one dir, main page]

Skip to content
< 8000 /div>
Calling refresh() always pulls content from master branch #672
Closed
@dprothero

Description

@dprothero

On version 0.9.5, I'm getting a content object like so:

content = repository.contents('/path/to/file', ref='some-other-branch')

If, at some point, I call:

content.refresh()

It pulls in the object from the master branch instead of some-other-branch.

I see on line 220 of github3\models.py it's calling:

json = self._json(self._get(self._api, headers=headers), 200)

But self._api doesn't have the "?ref=some-other-branch" on it, so it's just defaulting to master. Is the value of self._api wrong, should we use another variable, or am I just using the library incorrectly? Happy to provide a PR if someone can point me in the right direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0