jcabi-github
jcabi-github copied to clipboard
Remove reference doesn't work natively with Reference.ref()
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
@yegor256 please, pay attention to this issue
@pgressa would you be interested to contribute a fix in a pull request please?
Ok, I'll prepare one