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

WIP: Retrieve merge request status for any job #940

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

derrickgw
Copy link

This merge request adds a pipeline function gitlabMergeRequestStatus(projectId, branchName) to retrieve merge request information about any given project/branch.

This would be useful in cases where the pipeline needs to behave differently if there is a merge request open, e.g. running long resource intensive tests only for merge requests, or in pipelines that are triggered by other jobs. This is a partial solution to the fact that Multi-branch pipelines don't get run for merge requests. These values are retrieved directly since they can't be propagated to the multi-branch build.

Ideally this could be tested by having a mock gitlab instance provide canned JSON responses, but I don't know how to accomplish that within the existing framework.

This is WIP to:

  • Gauge interest
  • Get code review
  • Get advice on how to test

@markjacksonfishing
Copy link
Contributor

markjacksonfishing commented Sep 10, 2019

@derrickgw did you run a mvn clean install?

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

Successfully merging this pull request may close these issues.

2 participants