Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_git_tag not working #488

Closed
dlutsch opened this issue Nov 18, 2016 · 8 comments
Closed

create_git_tag not working #488

dlutsch opened this issue Nov 18, 2016 · 8 comments
Labels

Comments

@dlutsch
Copy link

dlutsch commented Nov 18, 2016

Repository.create_git_tag() does not seem to do anything for me when called (though other Repository methods do work). Sample code:

github_instance = Github("user", "pass")
repo = github_instance.get_repo("MyOrg/myrepo")
repo.create_git_tag(tag="test_tag", message="hello world", type="commit", object="f82f379529ad40a25a6")

After running this I don't see any tag created on the repo in github. Also when I look at the GitTag object returned the sha value is different every time I run this (and not equal to the "object" parameter in create_git_tag)

This is PyGithub 1.29 and Python 3.5.2

@paxenos
Copy link

paxenos commented Dec 21, 2016

I'm also experiencing this issue using PyGithub 1.29 and Python 2.7

@sheluchin
Copy link

I'm also getting an inconsistent object reference.

PyGithub 1.29
Python 3.5.2

@sheluchin
Copy link

Still getting this issue on PyGithub 1.32.

@nueverest
Copy link

Creating a tag is the primary reason that I wanted to use this library.

@oantonelli
Copy link

create_git_tag() only creates a tag object and it doesn't create a reference in github. To generate this reference you need to call the method create_git_ref():

github_instance = Github("user", "pass")
repo = github_instance.get_repo("MyOrg/myrepo")
t = repo.create_git_tag(tag="test_tag", message="hello world", type="commit", object="f82f379529ad40a25a6")
repo.create_git_ref('refs/tags/{}'.format(t.tag), t.sha)

@sheluchin
Copy link

@oantonelli Thanks! Using create_git_ref did fix my issue.

I'm wondering if create_git_tag_and_release can work properly. My understanding is that the tag needs to be created, then the reference for that tag must be created in GitHub, and only then the tag can be used for a release. When using create_git_tag_and_release, the reference isn't being created. I don't believe creating a reference in GitHub after creating the release would help.

@stale
Copy link

stale bot commented Jul 5, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 5, 2018
@sfdye sfdye added stale and removed wontfix labels Jul 12, 2018
@stale stale bot removed the stale label Jul 12, 2018
@stale
Copy link

stale bot commented Sep 10, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 10, 2018
@stale stale bot closed this as completed Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants