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

PHPCI Github status checks on PR #1288

Open stephan-v opened 7 years ago

stephan-v commented 7 years ago

I am wondering if it is possible get status checks for a pull request similar to what travis-ci and other services are doing:

status

This would help a lot since we don't constantly want to monitor the PHPCI server but rather just have our checks show up on pull requests.

Edit

I have noticed in the GithubBuild.php that there is a sendStatusPostback but I don't think anything happens with it curently. Does anybody know how I can enable this?

Seems like this also needs a token to work because it sets an Authorization token header. How can I check if a token has been set or not? Or how can I set up a token for my PHPCI app?

ptejada commented 7 years ago

Stephan,

If you look at older pull requests you will notice there used to be a check provided by the phpcibot user. I think the integration either broke or the server died.

On Fri, Dec 23, 2016, 7:12 AM Stephan notifications@github.com wrote:

I am wondering if it is possible get status checks for a pull request similar to what travis-ci and other services are doing:

[image: status] https://camo.githubusercontent.com/ec7636809f79c4849297fd869f18312fbe56d7f3/68747470733a2f2f66696c65732e726561646d652e696f2f4a52447543446752675747484447365a714d59775f676974687562312e706e67

This would help a lot since we don't constantly want to monitor the PHPCI server but rather just have our checks show up on pull requests.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Block8/PHPCI/issues/1288, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPd3QkibkJ74mZqaHWWPPmjPcRBuh3cks5rK7q8gaJpZM4LUxzG .

--

Sincerely,

Pablo Tejada

From Mobile

stephan-v commented 7 years ago

You are not making a whole lot of sense. You mean to say that there is all this Github specific logic that needs a token but no documentation on how to add a token or some config option to add your own token?

Things like: ./console phpci:poll-github

Need an access token to work, yet there is no option to add a token. That is besides editing the config.yml manually, which you have to know just by digging through the code.

Even if you set the access token commands like poll-github still fail.

Am I suppose to fix these things by setting up oauth by going to:

Admin >> Settings >> GitHub Application ?

The url that the poll-github command uses also needs to know my username but I see no reference to my username in the code of 'HttpClient.php' which is used to build the polling url.

ptejada commented 7 years ago

Sorry Stephan i was not clear on my comment. I did not tried to give you the solution to what you are asking. All am saying is that it has to be possible some how because i saw the green checks in older pull request in this repo.

Here as an example PR with a failing status https://github.com/Block8/PHPCI/pull/1200

On Fri, Dec 23, 2016, 8:05 AM Stephan notifications@github.com wrote:

You are not making a whole lot of sense. You mean to say that there is all this Github specific logic that needs a token but no documentation on how to add a token or some config option to add your own token?

Things like: ./console phpci:poll-github

Need an access token to work, yet there is no option to add a token. That is besides editing the config.yml manually, which you have to know just by digging through the code.

Even if you set the access token commands like poll-github still fail.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Block8/PHPCI/issues/1288#issuecomment-268987147, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPd3dTmDnqANWF4XFi0D4cr_4O1Zwgcks5rK8cRgaJpZM4LUxzG .

--

Sincerely,

Pablo Tejada

From Mobile

stephan-v commented 7 years ago

I know it is probably possible at the moment since I have found it in the codebase, but it seems utterly broken at the moment. Is that correct?

My authentication settings under setttings also displays nothing but an empty checkbox with:

Disable Authentication?

Are there normally suppose to be some fields with authentication settings there as well? Perhaps name and personal access token?

ptejada commented 7 years ago

Yes, at least the integration in this repo is broken. I think is because the live server that is suppose to run the tests is not running.

In your original post it sounds like you were asking if it was possible. I am just confirming that have seen the feature been used but i dont know how it works 😁

To be honest, if your repo is public you better of using travis-ci

On Fri, Dec 23, 2016, 8:27 AM Stephan notifications@github.com wrote:

I know it is probably possible at the moment since I have found it in the codebase, but it seems utterly broken at the moment. Is that correct?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Block8/PHPCI/issues/1288#issuecomment-268989561, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPd3ZaNFLqb1-s1u5hcF187lbMsAqBdks5rK8wwgaJpZM4LUxzG .

--

Sincerely,

Pablo Tejada

From Mobile

stephan-v commented 7 years ago

Travis-CI is too expensive for private repo's but thanks anyways. It's a shame the Github API functionally is practically non-existent now because nowhere are you asked for a personal access token, or oauth setup.

ptejada commented 7 years ago

If you figure this out please consider adding a how to guide to the wiki.

On Fri, Dec 23, 2016, 9:09 AM Stephan notifications@github.com wrote:

Travis-CI is too expensive for private repo's but thanks anyways.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Block8/PHPCI/issues/1288#issuecomment-268995112, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPd3RENRtqsiCHWsakVrl9aDWOPbLUdks5rK9X6gaJpZM4LUxzG .

--

Sincerely,

Pablo Tejada

From Mobile

Fenikkusu commented 7 years ago

It does work, but it is a slight pain in the rear to get working it seems. On a lower level:

1) Create a OAuth Integration 2) Update config.yml to have a phpci:github section with the Integration OAuth token and id 3) Setup a webhook that includes the permissions for pull requests as well as read permissions, etc.

Disclaimer Still working on this, but I do have it at least communicating to a certain degree.