jenkinsci / gitlab-branch-source-plugin

A Jenkins Plugin for GitLab Multibranch Pipeline jobs and Folder Organization
https://plugins.jenkins.io/gitlab-branch-source
MIT License
124 stars 94 forks source link

Do not build draft MRs #396

Closed basilevs closed 9 months ago

basilevs commented 9 months ago

Respect "Ignore builds for Work In Progress MRs" job property during project rescan.

Before the change: "Ignore builds for Work In Progress MRs" job property was respected while handling Gitlab events, but was ignored during project scan.

After the change: "Ignore builds for Work In Progress MRs" job property is always respected (no Draft MRs are built if property is set).

Fixes #384.

Caveat The job property is hidden in "Webhook Listener Conditions" behavior and is already applied when handling webhooks, but from usability point of view the discrepancy in behavior for hook and scan handling is a bug.

Testing done

### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [ ] Link to relevant pull requests, esp. upstream and downstream changes
- [ ] Ensure you have provided tests - that demonstrates feature works or fixes the issue