Skip to content

remove duplicates from --new-pr title#2478

Merged
boegel merged 3 commits intoeasybuilders:developfrom
migueldiascosta:duplicate_titles_new_pr
Apr 20, 2018
Merged

remove duplicates from --new-pr title#2478
boegel merged 3 commits intoeasybuilders:developfrom
migueldiascosta:duplicate_titles_new_pr

Conversation

@migueldiascosta
Copy link
Copy Markdown
Member

No description provided.

Comment thread easybuild/tools/github.py Outdated
elif file_info['ecs'] and all(file_info['new']) and not deleted_paths:
# mention software name/version in PR title (only first 3)
names_and_versions = ["%s v%s" % (ec.name, ec.version) for ec in file_info['ecs']]
names_and_versions = list(set(names_and_versions)) # remove duplicates
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

at least two spaces before inline comment

Comment thread easybuild/tools/github.py Outdated
elif file_info['ecs'] and all(file_info['new']) and not deleted_paths:
# mention software name/version in PR title (only first 3)
names_and_versions = ["%s v%s" % (ec.name, ec.version) for ec in file_info['ecs']]
names_and_versions = list(set(names_and_versions)) # remove duplicates
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.

you can use nub for this, from vsc.utils.missing (and then you don't need two lines)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

cool (it is indeed missing from Python :) )

@boegel boegel added the bug fix label Apr 20, 2018
@boegel boegel added this to the 3.6.0 milestone Apr 20, 2018
@boegel
Copy link
Copy Markdown
Member

boegel commented Apr 20, 2018

Going in, thanks @migueldiascosta!

@boegel boegel merged commit d74c2e2 into easybuilders:develop Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants