jcabi-github icon indicating copy to clipboard operation
jcabi-github copied to clipboard

Remove reference doesn't work natively with Reference.ref()

Open pgressa opened this issue 8 years ago • 3 comments

When trying to remove reference by using Reference.ref() then it fails:

References ref = ....
repo.git().references().remove(ref.ref())

Error message:

{"message":"Reference does not exist","documentation_url":"https://developer.github.com/v3/git/refs/#delete-a-reference"}

Root cause: The uri is not correctly constructed as it contains two refs key words:

https://api.github.com/repos/ORG/REPO/git/refs/refs/heads/BRANCH/BRANCH

pgressa avatar Nov 22 '17 14:11 pgressa

@yegor256 please, pay attention to this issue

0crat avatar Nov 22 '17 14:11 0crat

@pgressa would you be interested to contribute a fix in a pull request please?

yegor256 avatar Nov 23 '17 12:11 yegor256

Ok, I'll prepare one

pgressa avatar Nov 28 '17 15:11 pgressa