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

Builds are triggered for non-code changes #926

Open
jkugler opened this issue May 14, 2019 · 3 comments
Open

Builds are triggered for non-code changes #926

jkugler opened this issue May 14, 2019 · 3 comments

Comments

@jkugler
Copy link

jkugler commented May 14, 2019

Issue

Builds get triggered on any update to the merge request, not just code pushes and comments.

Context

  • Gitlab plugin version: 1.5.10
  • Gitlab version: 11.4.0
  • Jenkins version: 2.175
  • Job type: Matrix

Logs & Traces

I will provide logs if needed.

Problem description

In a prior version of the plugin, MR builds would only be triggered when the MR was created, when code was updated, or when the "magic comment" was made on the MR. As of a somewhat recent update (1.5.10, I'm not sure now), any change to the MR will trigger a build: change the assignee, change the title, change the description, etc.

Describe your problem in a meaningful way:
Making changes to the MR that should not trigger a build still triggers a build.

@sladkoff
Copy link

Also happening with:

  • Gitlab plugin version: 1.5.12
  • Gitlab version: 11.10.4
  • Jenkins version: 2.164

@Minipada
Copy link
Contributor

Minipada commented Jul 15, 2019

Any news on this? @jkugler

@ababushk
Copy link
Contributor

ababushk commented Oct 3, 2019

I think the problem is that GitLab sends an MR event on every change in a MR (description, assignee, labels, etc.) and plugin doesn't distinguish them. Looks like the following fields in JSON payload allow to check if actual commits were pushed:

    "action": "update",
    "oldrev": "0d6ea67a317dd6155425edc8b631f099dc0ec506"

So if both of these fields are present then there are code changes in MR.
I need this feature and I can develop it, but I'll certainly require some help because I'm new in Java and Jenkins plugins development

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

4 participants