dancryer / PHPCI

PHPCI is a free and open source continuous integration tool specifically designed for PHP.
BSD 2-Clause "Simplified" License
2.42k stars 441 forks source link

Throws Exception During Pull Request #1261

Closed mahalay closed 7 years ago

mahalay commented 7 years ago

Expected behaviour

Should Queue/Trigger a build during pull request

Actual behaviour

Throws this exception: Could not get commits, failed API request.

Steps to reproduce

Install, configure and make a pull request on your project

Environment info

Operating System: SLE12 PHP Version: 7.0.7 MySQL Version: MariaDB 10.0.26

Other info

Upon checking WebhookController::githubPullRequest() it seems to be unable to fetch the commits. I'd expect to see the deploy keys being used since mine's a private repository and I assume that to get the commits, the deploy keys should be used. But checking from github's dashboard, my deploy keys hasn't been used at all.

Perhaps I'm missing something, or I've missed an important detail from the docs. I hope someone could point me to the right direction

mahalay commented 7 years ago

Figured I have to set a token in PHPCI/config.yml:

phpci:
    github:
        token: <your_ugly_token_here>

This should be in the documentation as you can't set the token from the dashboard/settings page.