-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
emit github events #8
Conversation
.DS_Store | ||
.env |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This just ran this successfully here: https://github.com/no-duh/nodejs.org/pull/1 Travis updated the PR status also... I'm guessing it is because I gave it permission to and the https://github.com/node/nodejs.org repo doesn't give Travis the permission to..? I tried to follow along nodejs/nodejs.org#355 but didn't grasp what is going on. I'd like to completely mirror the behavior if I can. |
@williamkapke Try doing it in my org, I can set the permissions up. You need to enable advanced restrictions, try to sync travis, ask for org permission from your own permissions, turn travis on after you've approved it, and then revoke the permission from the org. |
Ok- as you probably saw, I created the |
@Fishrock123 ok, I guess you'll need to setup Travis. It won't let me do it... |
app.on('pull_request.opened', (event) => { | ||
const owner = event.repository.owner.login | ||
const repo = event.repository.name | ||
if (repo !== 'nodejs.org') return |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@williamkapke Ok https://travis-ci.org/TestOrgPleaseIgnore/nodejs.org is "semi-on" now. |
@williamkapke merged #12 to get enable the bot on the readable-stream repo, the merge conflict should be trivial to resolve. I renamed By rebasing on top of master you'll even get Travis to run this PR ;) Please confirm this is good to go after the conflict has been resolved, and I'll be more than happy to push it to production. |
|
Rebased. Tested. Here's the log output...
See: |
The latter sounds like we're using the Status API, but we're still commenting on PR's here.. Or did I misunderstand? |
The status here was emitted by travis itself, right? |
LGTM Looks like it introduces secrets, so we'll have to update the active PRs before pushing it to prod |
Ah yes. I added the header validation. So the |
app.on('pull_request.opened', (event) => { | ||
const owner = event.repository.owner.login | ||
const repo = event.repository.name | ||
if (!~enabledRepos.indexOf(repo)) return |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Not tested- but should mostly be correct ;)EDIT: Testing & working!
I'm using a
.env
file like discussed in #7 (comment)You'll probably notice thatEDIT: Needed to go a different direction in the end anyhow.github-webhook-handler
is referencing my fork- hopefully @rvagg will accept my PR and that can be replaced soon. If not, I can do it a uglier way.