Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix 132 tags not found#136

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@wellDan28
Copy link
Contributor

Close#132

The resolution contains two parts:

  1. Enable pagination when two tags were provided in the tags option
  2. Validate that the two tags were found (if they were provided)

getLastTags should use pagination when the tag option wereset to 2 tags and these tags weren not found yet
@codecov-io
Copy link

codecov-io commentedFeb 19, 2018
edited
Loading

Codecov Report

Merging#136 intomaster willdecrease coverage by47.05%.
The diff coverage is0%.

Impacted file tree graph

@@             Coverage Diff             @@##           master     #136       +/-   ##===========================================- Coverage   85.75%   38.69%   -47.06%===========================================  Files           7        7                 Lines         316      323        +7     ===========================================- Hits          271      125      -146- Misses         45      198      +153
Impacted FilesCoverage Δ
lib/src/Gren.js5.69% <0%> (-78.18%)⬇️
lib/src/GitHubInfo.js80.95% <0%> (-4.77%)⬇️

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update3e6b2e4...78762a5. Read thecomment docs.

@wellDan28wellDan28 mentioned this pull requestFeb 19, 2018
@wellDan28
Copy link
ContributorAuthor

@alexcanessa I don't understand why the codevcov tests are failing, do you have any clue?

@alexcanessa
Copy link
Member

@wellDan28 I'm trying to understand.

Copy link
Member

@alexcanessaalexcanessa left a comment

Choose a reason for hiding this comment

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

@wellDan28 don't worry for the codecov, it's going to automatically get fixed whenmaster runs.

_validateRequiredTagsExists(tags,requireTags){
if(requireTags.indexOf('all')>=0||!(requireTagsinstanceofArray))return;

consttagsNames=tags.map(x=>x.tag.name);
Copy link
Member

Choose a reason for hiding this comment

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

Please use explicit parameters name (i.e.tagData instead ofx)

if(missingTags.length>0){
constnotFoundMessage=(missingTags.length===1) ?'tag is' :'tags are';
throwchalk.red(`\nThe following${notFoundMessage} not found in the repository:${missingTags}. `+
'please provider tags that are exists in the repository');
Copy link
Member

Choose a reason for hiding this comment

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

Why not everything in the template literal?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I'm sorry, I don't understand, could you please explain what you mean?

if(missingTags.length>0){
constnotFoundMessage=(missingTags.length===1) ?'tag is' :'tags are';
throwchalk.red(`\nThe following${notFoundMessage} not found in the repository:${missingTags}. `+
'please provider tags that are exists in the repository');
Copy link
Member

Choose a reason for hiding this comment

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

Please change so that:

please provider tags that are exists in the repositoryplease provide existing tags.

Copy link
Member

@alexcanessaalexcanessa left a comment

Choose a reason for hiding this comment

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

@wellDan28 last feedback, promise 👍


constmissingTags=requireTags.filter(requireTag=>tagsNames.indexOf(requireTag)<0);
if(missingTags.length>0){
constnotFoundMessage=(missingTags.length===1) ?'tag is' :'tags are';
Copy link
Member

Choose a reason for hiding this comment

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

notFoundMessage toinflection as it makes more sense 👍

* Check that the require tags are exists in tags
*
*@param {Array} tags
*@param {any} requireTags
Copy link
Member

Choose a reason for hiding this comment

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

You can expectrequireTags to beArray becausethis.options.tags it's always anArray

/**
* Converts an array like string to an actual Array,
* converting also underscores to spaces
*
*@since 0.6.0
*@public
*
*@param {string} arrayLike The string of items
* e.g.
* "wont_fix, duplicate, bug"
*
*@return {Array} The items with spaces instead of underscores.
*/
functionconvertStringToArray(arrayLike){
if(!arrayLike){
return[];
}
if(typeofarrayLike==='object'){
returnObject.keys(arrayLike).map((itemKey)=>arrayLike[itemKey]);
}
returnarrayLike
.replace(/\s/g,'')
.split(',')
.map((itemName)=>itemName.replace(/_/g,' ',itemName));
}

Also, replace the@return with@throws as the function is only returningundefined

if(missingTags.length>0){
constnotFoundMessage=(missingTags.length===1) ?'tag is' :'tags are';
throwchalk.red(`\nThe following${notFoundMessage} not found in the repository:${missingTags}. `+
'please provide existing tags.');
Copy link
Member

Choose a reason for hiding this comment

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

Why not one template literal?

@alexcanessaalexcanessa merged commitadfc5e5 intogithub-tools:masterFeb 21, 2018
@wellDan28wellDan28 mentioned this pull requestApr 3, 2018
@alexcanessa
Copy link
Member

@all-contributors please add@wellDan28 for bug

@allcontributors
Copy link
Contributor

@alexcanessa

I've put upa pull request to add@wellDan28! 🎉

@alexcanessa
Copy link
Member

@all-contributors please add@wellDan28 for code

@allcontributors
Copy link
Contributor

@alexcanessa

I've put upa pull request to add@wellDan28! 🎉

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

Reviewers

@alexcanessaalexcanessaalexcanessa requested changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Tags not found

3 participants

@wellDan28@codecov-io@alexcanessa

[8]ページ先頭

©2009-2025 Movatter.jp