Skip to content

fix: add common error handling for missing or wrong username - #171

Merged
Berkmann18 merged 2 commits into
all-contributors:masterfrom
erdahuja:issue-170
Mar 17, 2019
Merged

Berkmann18 merged 2 commits into
all-contributors:masterfrom
erdahuja:issue-170

Conversation

@erdahuja

@erdahuja erdahuja commented Feb 23, 2019 •

Copy link
Copy Markdown
Contributor

What:

  1. Added username validation in inquirer prompt
  2. Add validation for wrong username while fetching info from github.

issue #6

Why:

  1. More informative errors.
  2. Better usability of package .

How:

  1. Added validation inquirer prompt.
  2. throwing error for no username in getUserInfo for github

Checklist:

  • Documentation
  • Tests
  • Ready to be merged
  • Added myself to contributors table

Comment thread src/repo/__tests__/github.js Resolved
@Berkmann18 Berkmann18 added status: in review type: maintenance Chores and housekeeping priority: medium Normal priority labels Feb 23, 2019
Comment thread src/repo/github.js Resolved

@Berkmann18 Berkmann18 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Make sure you follow the Angular commit convention as explained in the contribution guidelines.

@erdahuja

Copy link
Copy Markdown
Contributor Author

Make sure you follow the Angular commit convention as explained in the contribution guidelines.

Okay, thanks. I'll rebase and update once review process is completed. I think it's done now. since my doubt is resolved. Thanks!

Comment thread src/repo/__tests__/github.js Outdated
})

test('Throw error when no username is provided', () => {
expect(getUserInfo).toThrow('No login when adding a contributor. Please specify a username.')

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@sinchang I did it like this. Re read documentation. Actually expect should call the function not us.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Berkmann18 friendly ping

@erdahuja erdahuja changed the title fix:#170,#6 added common error handling for username not provided or wrong… fix: add common error handling for missing or wrong username Feb 25, 2019
@erdahuja
erdahuja force-pushed the issue-170 branch 2 times, most recently from 28c933e to c9a470b Compare February 25, 2019 14:01
@Berkmann18
Berkmann18 merged commit 3e046b7 into all-contributors:master Mar 17, 2019
@all-contributors-release-bot

Copy link
Copy Markdown
Member

🎉 This PR is included in version 6.1.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown

@all-contributors please add erdahuja for code.

🤖 Beep boop! This comment was added automatically by all-contributors-auto-action.
Not all contributions can be detected from Git & GitHub alone. Please comment any missing contribution types this bot missed.
...and of course, thank you for contributing! 💙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: medium Normal priority type: maintenance Chores and housekeeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants