Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extractIssue can not findString in args.Commit.Source/args.Commit.Target #4

Closed
0x01toby opened this issue May 7, 2022 · 1 comment

Comments

@0x01toby
Copy link
Contributor

0x01toby commented May 7, 2022

These two environment variables do not exist in drone。

func extractIssue(args Args) string {
	return regexp.MustCompile(args.Project + "\\-\\d+").FindString(
		fmt.Sprintln(
			args.Commit.Message,
			args.PullRequest.Title,
			args.Commit.Source, //  DRONE_COMMIT_SOURCE
			args.Commit.Target,  // DRONE_COMMIT_TARGET
		),
	)
}

env:

  • DRONE_COMMIT_TARGET
  • DRONE_COMMIT_SOURCE

https://docs.drone.io/pipeline/environment/reference/

@tphoney
Copy link
Contributor

tphoney commented May 31, 2022

A fix has been merged

@tphoney tphoney closed this as completed May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants