Skip to content

Commit

Permalink
Updating README
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwanthkumar committed Feb 22, 2015
1 parent ad90e52 commit 1886a95
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

This GoCD's SCM plugin polls the Github repository for any new Pull Requests and triggers the build pipeline. This plugin was built for one thing and that is to build PRs. No other fancy features. [This](https://groups.google.com/d/msg/go-cd-dev/Rt_Y5G2VkOc/ymIyeEds8swJ) discussion was the motivation behind building this plugin.

## How Pull Requests are Built
We pool periodically for any new PRs on the given repository. We build a pull request when it's first opened and when commits are added to the pull request throughout its lifetime.
Rather than test the commits from the branches the pull request is sent from, we test the merge between the origin and the upstream branch.

## Pull Request isn't being built
If a pull request isn't built, that usually means that it can't be merged. We rely on the merge commit that GitHub transparently creates between the changes in the source branch and the upstream branch the pull request is sent against.
So when you create or update a pull request, and Go doesn't create a build for it, make sure the pull request is mergeable. If it isn't, rebase it against the upstream branch and resolve any merge conflicts.

## Requirements
This needs GoCD >= v15.x which is due release as of writing.

Expand All @@ -11,6 +19,9 @@ This needs GoCD >= v15.x which is due release as of writing.
```
login=johndoe
password=thisaintapassword
# for enterprise installations - Make sure to add /api/v3 to the hostname
# ignore this field or have the value to https://api.github.com
endpoint=http://code.yourcompany.com/api/v3
```
- Lets assume you already have a pipeline "ProjectA" for one of your Github repos
- Do a 'Extract Template' from the pipeline (if not present already)
Expand Down Expand Up @@ -73,5 +84,4 @@ We store all the open PRs in this fashion. With this we can find if a PR has new
## To Dos
- Clean up the code esp. the JSON SerDe part
- Add proper tests around the plugin
- Remove the dependency on Github API and instead use `+refs/pull/*/head:refs/gh-pull/remotes/origin/*` to fetch all the pull requests and check for revisions against them.
- Add support for [Github's commit status](https://developer.github.com/v3/repos/statuses/) API to push build status to Github.
- Add support for [Github's commit status](https://developer.github.com/v3/repos/statuses/) API to push build status to Github. May be a separate task plugin?

0 comments on commit 1886a95

Please sign in to comment.