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

a more robust merge script #375

Closed
wants to merge 1 commit into from
Closed

a more robust merge script #375

wants to merge 1 commit into from

Conversation

sprsquish
Copy link
Contributor

When we can't look up a user's name or email the script fails. This will cause it to default to the user's login.

@@ -207,7 +207,9 @@ def merge(number)
user_login = pull_request['user']['login']
user_obj = Github.get("users/#{user_login}")
user_name = user_obj['name']
user_name = user_login if user_name.nil? || user_name.empty?
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can do this:
user_name = user_obj['name'] || user_login

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that only works if the value is nil or false

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. Shipit!

@sprsquish sprsquish closed this in 849a5d9 Apr 15, 2014
@sprsquish sprsquish deleted the fix-merge-script branch April 15, 2014 22:16
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.

None yet

2 participants