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

Fix #49: create-repo error if no description specified #50

Merged
merged 1 commit into from
May 29, 2016

Conversation

Manu343726
Copy link
Contributor

@Manu343726 Manu343726 commented May 28, 2016

This fixes #49 with the same solution that fixed #40 as you suggested.

I've also checked another functions of GitHub class searching for bugs like this, but didn't found something else left. Since seems that python API uses None as placeholder for optional arguments, I would write a wrapper around click.secho() to handle Nones as empty strings so this bug would never arise again.

@codecov-io
Copy link

Current coverage is 95.50%

Merging #50 into master will increase coverage by <.01%

@@             master        #50   diff @@
==========================================
  Files            34         34          
  Lines          2068       2069     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           1975       1976     +1   
  Misses           93         93          
  Partials          0          0          

Powered by Codecov. Last updated by 64d3d33...287a1d3

@donnemartin donnemartin merged commit 287a1d3 into donnemartin:master May 29, 2016
@donnemartin
Copy link
Owner

Thanks for the PR and for checking other areas.

I would write a wrapper around click.secho() to handle Nones as empty strings so this bug would never arise again.

I'm not sure I follow...click.secho takes a text param, and the text param is constructed in create_issue or create_repo before it is passed onto click.secho.

I'll submit a follow-up to update the tests based on the recent bug fixes.

@donnemartin
Copy link
Owner

Tests update: #51

@Manu343726
Copy link
Contributor Author

What I mean is that if you pass these arguments to a string "sanitization" function first, you don't have to worry about this None -> string bugs anymore.

@donnemartin
Copy link
Owner

Ah, sorry I misunderstood. Yes I agree. I think the existing TextUtils might be a good place for that.

@donnemartin
Copy link
Owner

Filed an issue to track the refactor: #52.

Thanks again!

@Manu343726
Copy link
Contributor Author

You're welcome

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