tomzx / php-semver-checker-git

Compares two source sets using git and determines the appropriate semantic versioning to apply.
MIT License
28 stars 5 forks source link

Integrate with github #23

Open tomzx opened 8 years ago

tomzx commented 8 years ago

Much like continuous integration (travis-ci) or code quality checkers (scrutinizer), php-semver-checker-git should integrate with github in order to provide a status report when a PR is submitted.

To do so, it appears we would need a web service to handle webhooks. Particularly, we need to handle pull request events

Then php-semver-checker-git would most likely need to call the web service when it has completed running on travis-ci.

I think the following statuses would be sent:

https://developer.github.com/v3/repos/statuses/

{
  "state": "pending",
  "target_url": "travis-job-url",
  "description": "Waiting for analysis to complete...",
  "context": "PHP Semantic Versioning Checker"
}
{
  "state": "success",
  "target_url": "travis-job-url",
  "description": "Initial semantic version: $initial<br/>Suggested semantic version: $suggested",
  "context": "PHP Semantic Versioning Checker"
}
paulandrieux commented 8 years ago

👍