From 1e98790015719874b759f1046aaeb55c31e791a1 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 6 Dec 2023 10:14:10 +0100 Subject: [PATCH] fix: remove workaround for missing pipeline url (#38) --- plugin/commit.go | 1 + plugin/pipeline.go | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/plugin/commit.go b/plugin/commit.go index 99958dc..98dbe9b 100644 --- a/plugin/commit.go +++ b/plugin/commit.go @@ -153,6 +153,7 @@ func currFromContext(c *cli.Context) Commit { } } +//nolint:dupl func prevFlags(category string) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ diff --git a/plugin/pipeline.go b/plugin/pipeline.go index 56aa9b8..7fc7a13 100644 --- a/plugin/pipeline.go +++ b/plugin/pipeline.go @@ -33,6 +33,7 @@ type Pipeline struct { Parent int64 } +//nolint:dupl func pipelineFlags(category string) []cli.Flag { return []cli.Flag{ &cli.Int64Flag{ @@ -54,10 +55,9 @@ func pipelineFlags(category string) []cli.Flag { Category: category, }, &cli.StringFlag{ - Name: "pipeline.url", - Usage: "pipeline url", - // TODO: Revert after https://github.com/woodpecker-ci/woodpecker/issues/2219 - // EnvVars: []string{"CI_PIPELINE_URL"}, + Name: "pipeline.url", + Usage: "pipeline url", + EnvVars: []string{"CI_PIPELINE_URL"}, Category: category, }, &cli.StringFlag{