Rename project to actions-sync

This commit is contained in:
Anthony Sterling
2020-07-02 19:36:10 +01:00
commit f7954c5ebf
1249 changed files with 376757 additions and 0 deletions

1
test/fixtures/repo.git/COMMIT_EDITMSG vendored Normal file
View File

@@ -0,0 +1 @@
change 2

1
test/fixtures/repo.git/HEAD vendored Normal file
View File

@@ -0,0 +1 @@
ref: refs/heads/master

12
test/fixtures/repo.git/config vendored Normal file
View File

@@ -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/*

1
test/fixtures/repo.git/description vendored Normal file
View File

@@ -0,0 +1 @@
Unnamed repository; edit this file 'description' to name the repository.

BIN
test/fixtures/repo.git/index vendored Normal file

Binary file not shown.

6
test/fixtures/repo.git/info/exclude vendored Normal file
View File

@@ -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]
# *~

2
test/fixtures/repo.git/logs/HEAD vendored Normal file
View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,2 @@
x<01><>M
<EFBFBD>0F]<5D><14>d2<64><32>q%^#<23>$m<>?RӅ<52><D385>xW<1F>ǃ/<2F><><V jNu<4E><19><>A[<5B>(<28><><EFBFBD><EFBFBD>Wq<57>}<7D>M<EFBFBD><4D>4ɡ<34>b^a<>K<EFBFBD><4B>z<EFBFBD>E:U*I<13><><EFBFBD><1E><><EFBFBD><EFBFBD>¬<EFBFBD>2<EFBFBD><32><EFBFBD>a<EFBFBD><61>><3E>x<>}<7D>7\<5C>o<EFBFBD>{?<3F>q<EFBFBD><71>u<EFBFBD><75>mE<6D>Q<18><><16><1C><>X<EFBFBD>_<EFBFBD>ICX<43> d<><64>$E<>

View File

@@ -0,0 +1 @@
e9009d51dd6da2c363d1d14779c53dd27fcb0c52

View File

49
test/github.go Normal file
View File

@@ -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)
}
}