Skip to content

Instantly share code, notes, and snippets.

@rranelli
Created November 26, 2014 00:13
Show Gist options
  • Save rranelli/80ecb343f51494effd38 to your computer and use it in GitHub Desktop.
Save rranelli/80ecb343f51494effd38 to your computer and use it in GitHub Desktop.
# -*- restclient -*-
:token := "<your secret private token>" # This is the gitlab authentication token
# Groups
:page := 1
GET https://<gitlabhost>/api/v3/groups?private_token=:token&page=:page
# Group
:group := 42
GET https://<gitlabhost>/api/v3/groups/:group?private_token=:token
# Use keeplines my good friend....
# And everything will be formatted so that you need only to paste stuff in the terminal
(progn
(keep-lines "ssh")
(indent-region (point-min) (point-max))
(save-excursion
(replace-regexp "\"ssh_url_to_repo\":" "git clone "))
(save-excursion
(replace-regexp ",$" " &")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment