list only dirty repos
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
04e5b38887
commit
f1fbbb3c19
7
Makefile
7
Makefile
|
@ -49,12 +49,19 @@ redomod:
|
||||||
curl-help:
|
curl-help:
|
||||||
curl --silent http://localhost:9419/help
|
curl --silent http://localhost:9419/help
|
||||||
|
|
||||||
|
# only show repos that git reports as dirty
|
||||||
|
curl-list-dirty:
|
||||||
|
curl --silent http://localhost:9419/list?onlydirty=true
|
||||||
|
|
||||||
|
# only show repos that need to be merged to the master branch
|
||||||
curl-list-changed:
|
curl-list-changed:
|
||||||
curl --silent http://localhost:9419/list?perfect=false
|
curl --silent http://localhost:9419/list?perfect=false
|
||||||
|
|
||||||
|
# include repos that you probably can't git push commits
|
||||||
curl-list-include-readonly:
|
curl-list-include-readonly:
|
||||||
curl --silent http://localhost:9419/list?readonly=true
|
curl --silent http://localhost:9419/list?readonly=true
|
||||||
|
|
||||||
|
# list every repo found
|
||||||
curl-gitpull-everypackage:
|
curl-gitpull-everypackage:
|
||||||
curl --silent http://localhost:9419/gitpull
|
curl --silent http://localhost:9419/gitpull
|
||||||
|
|
||||||
|
|
7
http.go
7
http.go
|
@ -93,6 +93,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
if route == "/list" {
|
if route == "/list" {
|
||||||
readonly := r.URL.Query().Get("readonly")
|
readonly := r.URL.Query().Get("readonly")
|
||||||
|
onlydirty := r.URL.Query().Get("onlydirty")
|
||||||
perfect := r.URL.Query().Get("perfect")
|
perfect := r.URL.Query().Get("perfect")
|
||||||
var count int
|
var count int
|
||||||
|
|
||||||
|
@ -102,6 +103,12 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
count += 1
|
count += 1
|
||||||
header := repo.StandardHeader()
|
header := repo.StandardHeader()
|
||||||
|
if onlydirty == "true" {
|
||||||
|
if repo.CheckDirty() {
|
||||||
|
msg(w, header+"")
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if repo.ReadOnly() {
|
if repo.ReadOnly() {
|
||||||
if readonly == "true" {
|
if readonly == "true" {
|
||||||
|
|
Loading…
Reference in New Issue