mirror of
https://github.com/rwinkhart/go-gitea-vendor.git
synced 2026-09-06 09:07:20 -04:00
Require organization
This commit is contained in:
@@ -10,7 +10,9 @@ ENABLE_PUSH_CREATE_USER = true
|
|||||||
ENABLE_PUSH_CREATE_ORG = true
|
ENABLE_PUSH_CREATE_ORG = true
|
||||||
```
|
```
|
||||||
|
|
||||||
Optionally, create a new organization in your Gitea instance to store your `ggv` vendor repos.
|
Create a new organization in your Gitea instance to store your `ggv` vendor repos.
|
||||||
|
This is necessary not just to keep your Gitea clean, but also to tell `ggv` what repos to ignore as inputs
|
||||||
|
(you don't want to vendor your vendor repos!).
|
||||||
|
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
>It is recommended to create a user that only has access to that one organization and use said new user to generate the below API key.
|
>It is recommended to create a user that only has access to that one organization and use said new user to generate the below API key.
|
||||||
|
|||||||
@@ -34,16 +34,13 @@ type giteaRespT struct {
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// args
|
// args
|
||||||
if len(os.Args) < 2 {
|
if len(os.Args) < 3 {
|
||||||
fmt.Println("Usage: " + os.Args[0] + " <base url> [output organization]\n\nAPI token can be piped into stdin to run non-interactively!")
|
fmt.Println("Usage: " + os.Args[0] + " <base url> <output organization>\n\nAPI token can be piped into stdin to run non-interactively!")
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
baseURL := os.Args[1]
|
baseURL := os.Args[1]
|
||||||
apiURL := baseURL + "/api/v1/repos/search?sort=updated&order=asc&limit=999"
|
apiURL := baseURL + "/api/v1/repos/search?sort=updated&order=asc&limit=999"
|
||||||
var organization string
|
organization := os.Args[2]
|
||||||
if len(os.Args) == 3 {
|
|
||||||
organization = os.Args[2]
|
|
||||||
}
|
|
||||||
fmt.Print("Input token: ")
|
fmt.Print("Input token: ")
|
||||||
token := back.ReadFromStdin()
|
token := back.ReadFromStdin()
|
||||||
if len(token) == 0 {
|
if len(token) == 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user