Pull Request support for AzureDevOps (VSTS)

contrib-this-feature

#1

Description of the feature request

For the moment Bitrise webhooks integration with VSTS is only limited for Code Push and Tag Push event.
I’ts very appreciable to have support for Pull Request Created/Updated as well
As you can see in VSTS Service Hooks already have the necessary event for that.

Use case / for what or how I would use it

Some organization (like ours) is tied with VSTS and all of our repos are in there. We already have setup our mobile CD/CI in Bitrise and it wont be completed without a PR builds


Git clone cannot merge when PR build is triggered from api
#2

Hi @aladdinG,
Thank you for the feature request and describing your use case! We already have a card for this in our board and I also added this feature request to the notification list, so we’ll get back to you here as soon as the feature is ready! :slightly_smiling_face:


#3

I have the same problem, and I kinda solved it this way: for each commit, I’d like to know if it could cause merge conflicts to (in my case) develop. So at the end of my workflow, if all went well, I check out the develop branch, try to merge the changed branch, and run tests on the result.
It is not the same as a PR trigger, but it will help me to find merge conflicts sooner in our development process.

Here is the script build step that works for me:

#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x

TARGET_BRANCH="develop"
SOURCE_BRANCH="$BITRISE_GIT_BRANCH"

git reset --hard

git "checkout" "$SOURCE_BRANCH"

git merge "origin/$SOURCE_BRANCH"

git fetch "origin" "$TARGET_BRANCH"

git reset --hard
git checkout origin/$TARGET_BRANCH
git merge $SOURCE_BRANCH

#4

That’s a really great idea @jpalten, thanks for sharing! :slight_smile:


#5

I also marked this #feature-request with the #contrib-this-feature tag as it can be contributed by anyone, in the https://github.com/bitrise-io/bitrise-webhooks repo.

The GitHub, Bitbucket and GitLab implementations can serve as guidance for an implementation. We’re also happy to help with it if someone would start working on it and would have any questions, feel free to ping our support (onsite chat or email) who will route you to the right person/team :wink: