mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-12 20:21:34 +00:00
Add milestone to metadata (#5174)
This commit is contained in:
@@ -108,6 +108,7 @@ func (m *Metadata) Environ() map[string]string {
|
||||
setNonEmptyEnvVar(params, "CI_COMMIT_TARGET_BRANCH", targetBranch)
|
||||
setNonEmptyEnvVar(params, "CI_COMMIT_PULL_REQUEST", pullRegexp.FindString(pipeline.Commit.Ref))
|
||||
setNonEmptyEnvVar(params, "CI_COMMIT_PULL_REQUEST_LABELS", strings.Join(pipeline.Commit.PullRequestLabels, ","))
|
||||
setNonEmptyEnvVar(params, "CI_COMMIT_PULL_REQUEST_MILESTONE", pipeline.Commit.PullRequestMilestone)
|
||||
}
|
||||
|
||||
// Only export changed files if maxChangedFiles is not exceeded
|
||||
|
@@ -61,15 +61,16 @@ type (
|
||||
|
||||
// Commit defines runtime metadata for a commit.
|
||||
Commit struct {
|
||||
Sha string `json:"sha,omitempty"`
|
||||
Ref string `json:"ref,omitempty"`
|
||||
Refspec string `json:"refspec,omitempty"`
|
||||
Branch string `json:"branch,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
Author Author `json:"author,omitempty"`
|
||||
ChangedFiles []string `json:"changed_files,omitempty"`
|
||||
PullRequestLabels []string `json:"labels,omitempty"`
|
||||
IsPrerelease bool `json:"is_prerelease,omitempty"`
|
||||
Sha string `json:"sha,omitempty"`
|
||||
Ref string `json:"ref,omitempty"`
|
||||
Refspec string `json:"refspec,omitempty"`
|
||||
Branch string `json:"branch,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
Author Author `json:"author,omitempty"`
|
||||
ChangedFiles []string `json:"changed_files,omitempty"`
|
||||
PullRequestLabels []string `json:"labels,omitempty"`
|
||||
PullRequestMilestone string `json:"milestone,omitempty"`
|
||||
IsPrerelease bool `json:"is_prerelease,omitempty"`
|
||||
}
|
||||
|
||||
// Author defines runtime metadata for a commit author.
|
||||
|
Reference in New Issue
Block a user