Expose pull request status over REST API

Issue #13 new
Georgy Bolyuba created an issue

This plugin adds a number of statuses to the pull request (paused, blocked). This statuses can be used by other tools (CI, reporting). This info must find its way into pull request REST API

Comments (6)

  1. Adam Kaufman

    Blocking pull requests from a CI server is functionality that I am looking into right now. Any chance this issue will be addressed soon?

  2. Georgy Bolyuba reporter

    This feature is a basis for number of other features I am working on. I curious in your use case as I only saw the need for read-only status so far. Can you share the details? When do you want to block PR form CI server? On failed build? How do your CI/Stash intergration is setup?

  3. Adam Kaufman

    I'm using Jenkins for CI orchestration, and it is only loosely coupled with the Stash server. The use case that I am looking for is:

    1. create a job on pull request (based on a template)
    2. run the job on each commit to that pull request
    3. disallow merges if the job is failing

    The last step there could be handled in a number of ways, but I like the idea of using this plugin because it gives visual feedback on the pull request page. Also, since Jenkins is already responsible for polling Stash for changes, it would make sense that it be responsible for updating it with this sort of information as well. What's your time frame for implementation at this point?

  4. Georgy Bolyuba reporter

    Unless I misunderstand your useless, this is already doable today. What you need is to point Jenkins to your repo for branch monitoring (sounds like you already done that). Then you need to make Jenkins report build status back to Stash. Check out Stash Build API. Note that build status is reported per sha1/commit. After that in repo settings you need to enable (Require at least X successful builds). Is this what you are after?

  5. Georgy Bolyuba reporter

    If you leave your skype ID we can have a quick chat so I understand better what is your exact useless

  6. Adam Kaufman

    Just to close the loop on this, I ended up tweaking my approach and utilizing built-in functionality to accomplish what I needed. Thanks for your time!

  7. Log in to comment