drone / drone-jira

Drone plugin for sending build and deployment status updates to Jira
Other
7 stars 19 forks source link

fix: remove source & target. and add branch. #5

Closed 0x01toby closed 2 years ago

0x01toby commented 2 years ago

can not found in https://docs.drone.io/pipeline/environment/reference/

https://github.com/drone/drone-jira/issues/4

bradrydzewski commented 2 years ago

Thanks, you are correct that these values do not exist. I think the solution would be to the following change:

    Commit struct {
        Rev     string `envconfig:"DRONE_COMMIT_SHA"`
        Before  string `envconfig:"DRONE_COMMIT_BEFORE"`
        After   string `envconfig:"DRONE_COMMIT_AFTER"`
        Ref     string `envconfig:"DRONE_COMMIT_REF"`
        Branch  string `envconfig:"DRONE_COMMIT_BRANCH"`
-       Source  string `envconfig:"DRONE_COMMIT_SOURCE"`
-       Target  string `envconfig:"DRONE_COMMIT_TARGET"`
+       Source  string `envconfig:"DRONE_SOURCE_BRANCH"`
+       Target  string `envconfig:"DRONE_TARGET_BRANCH"`

https://github.com/drone/drone-jira/blob/master/plugin/pipeline.go#L43:L44

0x01toby commented 2 years ago

you are right. I update it.

tphoney commented 2 years ago

Thanks for the fix @taorzhang