Service Hook of Pull Request created is not being triggered when Pull request is created through Team Services REST API - rest

I'm trying to integrate my Visual Studio Team Services with Slack, and the first thing I tried to do was notify my Slack channel whenever a Pull request is created.
So I searched through the options, and the best fit so far was the Service Hooks available on Team Services, which integrate seamlessly with Slack, or does it?
The problem I encountered was: I use a tool that creates pull requests through the REST API, and the service hook doesn't seem to be working when I create pull requests through this method, only when using Team Services UI.
This is the Service Hook configuration.
Has anyone faced the same problem, or know any other way of notifying a pull request creation to slack?

Apparently the issue has been fixed by Microsoft, the last update of Team Services triggers the event without a problem now.

Related

Is there any way to trigger a Google Cloud build ONLY when a merge request is accepted on a specific branch?

Basically I just started using Google Cloud and I'm looking for a way to trigger a deployment ONLY when a pull request is accepted on a distant github repository.
I'm currently using the google "Cloud Build Trigger" to execute my 'cloudbuild.yaml' as soon as a push is detected on my master branch, but simply attempting a merge request seems to trigger my build process.
This is troublesome as a merge request will be reviewed by peers and I don't want my cloud application to rebuild if the merge request is to be denied after being reviewed.
As this feature is still in beta, I assume this is not supported yet and that there is a better way to handle such task, but when I heard of the trigger feature it seemed like the most straightforward way to connect my github repository to the build process on google cloud. Anyway, hope someone had to face this issue or can help me figure this one out.
Thanks !
Based on the documentation, Cloud Build triggers currently only support changes pushed to the build source (a remote Github repo in this case). There doesn't seem to be a way to distinguish between a merge resulting from a (remote) pull request or a local one from the Google Cloud Console GUI.
However, you are not without options. One alternative is to leverage Github's PullRequestEvent Webhook and deploy a GAS Web App or Cloud Function to serve as a web-hook endpoint. The GAS Web App or Cloud Function could then parse the event payload for GitHub's PullRequestEvent and if the pull request is closed and merged then you call the REST API for the Cloud Build service to start your build.

Identifying work items which have been released via VSTS API

Trying to determine which VSTS Work Items have been released to a given Environment (production). Ideally looking for a Service Hook to tell me when work items are deployed so we can keep the rest of the company updated on when items are deployed.
Cannot find this available in the VSTS API.
In the VSTS UI under the Release Summary tab it shows linked Work Items. However linked Work Items don't appear to be available via the API.
VSTS API docs for Get Release
In the VSTS UI under each Work Item, it shows when it was integrated into a build, however not when that build has been released.
Any ideas?
There's a REST API, you're just looking in the wrong place for it. BTW, you can find this stuff easily by looking at the network traffic in the F12 tools in your browser.
https://<accountUrl>/<Project>/_apis/Release/releases/<ReleaseID>/workitems?baseReleaseId=<ReleaseToCompareAgainst>&%24top=250
For your question:
Ideally looking for a Service Hook to tell me when work items are
deployed so we can keep the rest of the company updated on when items
are deployed.
The deployed work items information is already included in the Release Deployment Service Hooks as below:
So you just need to create a Service Hook for Release deployment completed event and create a web service to listen on this.

Replacing Github email service with Webhooks

Right now we are using the Github email service so that our team receives notifications whenever changes are made. However, soon Github services will be deprecated. I was wondering if there was any pre existing services that could replicate the behavior that the Github email service produced. This would save us a lot of time and we wouldn't have to run a server just for handling this one webhook.
Thanks
As recently (Nov. 2018) confirmed in "GitHub Services Brownout Updates and Timeline", GitHub services (like email notification) will disappear in January 2019.
The original annoucement suggested to replace them with webhooks.
The intention of GitHub Services was to allow third-party developers to submit code for integrating with their services, but this functionality has been superseded by GitHub Apps and webhooks.
In addition, check out GitHub Actions, still in beta but which have potential.
There are efforts made to look for a webhook-based alternative in the meantime. As in for instance pyinstaller/pyinstaller issue 3579. But no clear answer yet.
Update Feb. 2020: this issue is now closed. And GitHub Actions are no longer in beta.

How to integrate an external API in web-hook integration on a repository?

I am using a Web-hooks services in GitHub.
Whenever an event occurs on my repository, that will notify on ngrok server.
I Want to call my API whenever an event happens in my repository.
You'll probably need to build a small proxy service which will accept the webhook delivery from GitHub and translate it to an call of your API. You can't change how the payload of the webhook delivery looks in GitHub, you you need to make that change in a small proxy service and then call the API using the information from the webhook delivery.

Github Enterprise - Plugin for Jenkins

I'm trying to get the post-commit hooks for github enterprise to talk to our internal jenkins server. Been trying for the last several hours and haven't been able to get it working.
What I was able to do is get the github enterprise webhook with url:
http://192.168.10.123:8080/job/Github%20Build%20Test/build
working to kick off a build.
I'm not able to authenticate with github enterprise using either the basic authentication or oauth2 authentication tokens.
Also with manual setup it doesn't seem to work either. Any ideas / help?
I think you may need to wait for v1.41 of the Jenkins GitHub API plugin
See this pull request