Skip to content

Commit

Permalink
Add possibility to delete refs (#284)
Browse files Browse the repository at this point in the history
* Update repo.js

* Update repo.coffee

* Delete from lib
  • Loading branch information
Chaosbohne authored and pksunkara committed Jul 17, 2017
1 parent 66b079e commit b3d928f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/octonode/repo.coffee
Expand Up @@ -422,6 +422,13 @@ class Repo
return cb(err) if err
if s isnt 200 then cb(new Error("Repo updateRef error")) else cb null, b

# Delete a reference
# '/repos/pksunkara/hub/git/refs/REF' DELETE
deleteRef: (ref, cb) ->
@client.del "/repos/#{@name}/git/refs/#{ref}", {}, (err, s, b, h) ->
return cb(err) if err
if s isnt 204 then cb(new Error("Ref delete error")) else cb null

# Delete the repository
# '/repos/pksunkara/hub' DELETE
destroy: (cb) ->
Expand Down

0 comments on commit b3d928f

Please sign in to comment.