Skip to content
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

[REF] runbot: Get repo data from json request of github webhook #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

moylop260
Copy link
Contributor

Parse the json request to find the right repo.

@moylop260
Copy link
Contributor Author

ping @odony
Could you give us your feedback?

event = request.httprequest.headers.get("X-Github-Event")
if repo_data and event in ['push', 'pull_request']:
repo_owner = repo_data['owner'].get('name') or repo_data['owner'].get('login')
repo_name = repo_data['name']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of parsing repo.owner.name/login and repo.name, why don't you use repo.full_name directly?

@odony
Copy link
Contributor

odony commented Nov 20, 2015

Thanks!

@moylop260
Copy link
Contributor Author

@odony
Thanks for feedback
Fixed!

@moylop260
Copy link
Contributor Author

@odony
FYI rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants