mirror of
https://github.com/thegeeklab/wp-plugin-go.git
synced 2024-11-23 16:50:39 +00:00
fix: fix env vars to fetch metadata urls (#14)
This commit is contained in:
parent
87ca9df3f4
commit
7c3ed98b56
@ -56,7 +56,7 @@ func pipelineFlags(category string) []cli.Flag {
|
||||
&cli.StringFlag{
|
||||
Name: "pipeline.link",
|
||||
Usage: "pipeline link",
|
||||
EnvVars: []string{"CI_PIPELINE_LINK"},
|
||||
EnvVars: []string{"CI_PIPELINE_URL"},
|
||||
Category: category,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
|
@ -20,6 +20,7 @@ import (
|
||||
|
||||
// Repository defines runtime metadata for a repository.
|
||||
type Repository struct {
|
||||
Slug string `json:"slug,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Owner string `json:"owner,omitempty"`
|
||||
Link string `json:"link,omitempty"`
|
||||
@ -30,6 +31,12 @@ type Repository struct {
|
||||
|
||||
func repositoryFlags(category string) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "repo.slug",
|
||||
Usage: "repo slug",
|
||||
EnvVars: []string{"CI_REPO"},
|
||||
Category: category,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "repo.name",
|
||||
Usage: "repo name",
|
||||
@ -45,7 +52,7 @@ func repositoryFlags(category string) []cli.Flag {
|
||||
&cli.StringFlag{
|
||||
Name: "repo.link",
|
||||
Usage: "repo link",
|
||||
EnvVars: []string{"CI_REPO_LINK"},
|
||||
EnvVars: []string{"CI_REPO_URL"},
|
||||
Category: category,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
@ -71,6 +78,7 @@ func repositoryFlags(category string) []cli.Flag {
|
||||
|
||||
func repositoryFromContext(c *cli.Context) Repository {
|
||||
return Repository{
|
||||
Slug: c.String("repo.slug"),
|
||||
Name: c.String("repo.name"),
|
||||
Owner: c.String("repo.owner"),
|
||||
Link: c.String("repo.link"),
|
||||
|
@ -44,7 +44,7 @@ func systemFlags(category string) []cli.Flag {
|
||||
&cli.StringFlag{
|
||||
Name: "system.link",
|
||||
Usage: "system link",
|
||||
EnvVars: []string{"CI_SYSTEM_LINK"},
|
||||
EnvVars: []string{"CI_SYSTEM_URL"},
|
||||
Category: category,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
|
Loading…
Reference in New Issue
Block a user