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

PullRequest.Fork field is unintended content #122

Open
kamijin-fanta opened this issue Sep 29, 2021 · 0 comments
Open

PullRequest.Fork field is unintended content #122

kamijin-fanta opened this issue Sep 29, 2021 · 0 comments

Comments

@kamijin-fanta
Copy link

It seems that the webhook payload is wrong when a Pull Request or Merge Request is issued within GitHub and GitLab.The PullRequest.Fork is always set to the repository name, even when the PR comes from a branch or fork.

I think the string should only be specified when the PR is issued from the fork repository, otherwise it should be empty.

github driver: https://github.com/drone/go-scm/blob/v1.15.2/scm/driver/github/pr.go#L153
gitlab driver: https://github.com/drone/go-scm/blob/v1.15.2/scm/driver/gitlab/webhook.go#L267
bitbucket driver: https://github.com/drone/go-scm/blob/v1.15.2/scm/driver/bitbucket/webhook.go#L585

It seems that the code that uses this library is also expected to specify an empty string if it is not forked repository.
https://github.com/drone/drone/blob/v2.4.0/plugin/secret/encrypted.go#L57

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

1 participant