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

Copy Fork values when re-started build #2708

Closed
bradrydzewski opened this issue May 14, 2019 · 1 comment
Closed

Copy Fork values when re-started build #2708

bradrydzewski opened this issue May 14, 2019 · 1 comment
Milestone

Comments

@bradrydzewski
Copy link

There is a bug in the code that re-starts a build where the Fork value is not copied to the new build object. As a result, the build is rejected when Forks are disabled.

		hook := &core.Hook{
			Trigger:      user.Login,
			Event:        prev.Event,
			Action:       prev.Action,
			Link:         prev.Link,
			Timestamp:    prev.Timestamp,
			Title:        prev.Title,
			Message:      prev.Message,
			Before:       prev.Before,
			After:        prev.After,
			Ref:          prev.Ref,
+			Fork:         prev.Fork,
			Source:       prev.Source,
			Target:       prev.Target,
			Author:       prev.Author,
			AuthorName:   prev.AuthorName,
			AuthorEmail:  prev.AuthorEmail,
			AuthorAvatar: prev.AuthorAvatar,
			Sender:       prev.Sender,
			Params:       map[string]string{},
		}

[1] https://github.com/drone/drone/blob/master/handler/api/repos/builds/retry.go#L66

@bradrydzewski
Copy link
Author

fixed in master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant