Rename project to actions-sync
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
change 2
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
ref: refs/heads/master
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
[core]
|
||||
repositoryformatversion = 0
|
||||
filemode = true
|
||||
bare = false
|
||||
logallrefupdates = true
|
||||
ignorecase = true
|
||||
precomposeunicode = true
|
||||
[receive]
|
||||
denyCurrentBranch = false
|
||||
[remote "origin"]
|
||||
url = git://localhost:9419/org/repo
|
||||
fetch = +refs/heads/*:refs/remotes/origin/*
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
||||
Vendored
BIN
Binary file not shown.
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
# git ls-files --others --exclude-from=.git/info/exclude
|
||||
# Lines that start with '#' are comments.
|
||||
# For a project mostly in C, the following would be a good set of
|
||||
# exclude patterns (uncomment them if you want to use them):
|
||||
# *.[oa]
|
||||
# *~
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
0000000000000000000000000000000000000000 a5984bb887dd2fcdc2892cd906d6f004844d1142 Hayden Faulds <fauldsh@gmail.com> 1588240827 +0100 commit (initial): change 1
|
||||
a5984bb887dd2fcdc2892cd906d6f004844d1142 e9009d51dd6da2c363d1d14779c53dd27fcb0c52 Hayden Faulds <fauldsh@gmail.com> 1588240840 +0100 commit: change 2
|
||||
@@ -0,0 +1,2 @@
|
||||
0000000000000000000000000000000000000000 a5984bb887dd2fcdc2892cd906d6f004844d1142 Hayden Faulds <fauldsh@gmail.com> 1588240827 +0100 commit (initial): change 1
|
||||
a5984bb887dd2fcdc2892cd906d6f004844d1142 e9009d51dd6da2c363d1d14779c53dd27fcb0c52 Hayden Faulds <fauldsh@gmail.com> 1588240840 +0100 commit: change 2
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
x�ŽM
|
||||
Â0F]ç³d2�¦q%^#É$m¡?RÓ…··xW¼Çƒ/ó<V jNuË‚ˆA[º(œÛèŠWq–}ÇMŠä4É¡ºb^aËK…ÐzáE:U*I‰§¤�º‚ȬÖ2™°×aÝà>šx„}Ò7\Ëo‡{?‡qº¤u¾�mEˆQáŒÑô¸Xó_±ICXúd¾û$EŽ
|
||||
+1
@@ -0,0 +1 @@
|
||||
e9009d51dd6da2c363d1d14779c53dd27fcb0c52
|
||||
@@ -0,0 +1,49 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"path"
|
||||
|
||||
"github.com/google/go-github/v25/github"
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var port, gitDaemonURL string
|
||||
flag.StringVar(&port, "p", "", "")
|
||||
flag.StringVar(&gitDaemonURL, "git-daemon-url", "", "")
|
||||
flag.Parse()
|
||||
|
||||
r := mux.NewRouter()
|
||||
r.HandleFunc("/ping", func(w http.ResponseWriter, r *http.Request) {})
|
||||
r.HandleFunc("/api/v3/orgs/{org}/repos", func(w http.ResponseWriter, r *http.Request) {
|
||||
orgName := mux.Vars(r)["org"]
|
||||
b, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
var repoReq struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
}
|
||||
err = json.Unmarshal(b, &repoReq)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
cloneURL := gitDaemonURL + path.Join(orgName, repoReq.Name, ".git")
|
||||
repo := github.Repository{Name: &repoReq.Name, CloneURL: &cloneURL}
|
||||
b, _ = json.Marshal(repo)
|
||||
_, err = w.Write(b)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}).Methods("POST")
|
||||
|
||||
err := http.ListenAndServe(":"+port, r)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user