0
0
mirror of https://github.com/thegeeklab/wp-plugin-go.git synced 2024-06-02 18:39:40 +02:00

fix: fix env vars to fetch metadata urls (#14)

This commit is contained in:
Robert Kaussow 2023-08-16 08:36:06 +02:00 committed by GitHub
parent 87ca9df3f4
commit 7c3ed98b56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View File

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

View File

@ -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"),

View File

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