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

Add Update Release Notes command #338

Merged
merged 65 commits into from
Apr 30, 2020
Merged

Add Update Release Notes command #338

merged 65 commits into from
Apr 30, 2020

Conversation

amshamah419
Copy link
Contributor

@amshamah419 amshamah419 commented Apr 12, 2020

Status

  • In Progress
  • Ready
  • In Hold - Need confirmation of release notes format. @yuvalbenshalom

Related Issues

fixes: demisto/etc#22984

Description

Added the demisto-sdk update-release-notes command.

Must have

  • Tests
  • Documentation

@amshamah419 amshamah419 self-assigned this Apr 12, 2020
@coveralls
Copy link
Collaborator

coveralls commented Apr 12, 2020

Pull Request Test Coverage Report for Build 2979

  • 149 of 188 (79.26%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 68.768%

Changes Missing Coverage Covered Lines Changed/Added Lines %
demisto_sdk/commands/create_artifacts/content_creator.py 9 12 75.0%
demisto_sdk/commands/update_release_notes/update_rn.py 138 174 79.31%
Files with Coverage Reduction New Missed Lines %
demisto_sdk/commands/validate/file_validator.py 1 38.58%
Totals Coverage Status
Change from base Build 2976: 0.02%
Covered Lines: 5870
Relevant Lines: 8536

💛 - Coveralls

@amshamah419
Copy link
Contributor Author

@yuvalbenshalom More critically, this includes the fix to allow markdown files to be added to the content-pack.zip

Copy link
Contributor

@yuvalbenshalom yuvalbenshalom left a comment

Choose a reason for hiding this comment

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

see my comments.

Copy link
Contributor

@yuvalbenshalom yuvalbenshalom left a comment

Choose a reason for hiding this comment

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

looks very good.
see my comments.

demisto_sdk/__main__.py Outdated Show resolved Hide resolved
demisto_sdk/__main__.py Show resolved Hide resolved
pre_release=pre_release)
update_pack_rn.execute_update()
elif is_all and _pack:
print_error(f"Please remove the --all flag when specifying only one pack.")
Copy link
Contributor

Choose a reason for hiding this comment

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

nice

demisto_sdk/__main__.py Outdated Show resolved Hide resolved
demisto_sdk/commands/update_release_notes/update_rn.py Outdated Show resolved Hide resolved
demisto_sdk/commands/update_release_notes/update_rn.py Outdated Show resolved Hide resolved
else:
name = os.path.basename(file_path)
print_error(f"Could not find name in {file_path}")
# sys.exit(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's for cases where a yml or json doesn't contain the entity name. I could remove the print, or make the message more clear if that works


@staticmethod
def find_corresponding_yml(file_path):
if file_path.endswith('.py'):
Copy link
Contributor

Choose a reason for hiding this comment

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

question, should this be relevant to other files in the pack? why just py/yml?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Py files don't have a file structure where I can extract the display name so I know that if we get a python file in the git diff, it's either a script or an integration which should have the display name in the yml. The code above is to load the yml file path so we can pull the display name.

Copy link
Contributor

@yuvalbenshalom yuvalbenshalom left a comment

Choose a reason for hiding this comment

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

nice

@amshamah419 amshamah419 merged commit db6e858 into master Apr 30, 2020
@amshamah419 amshamah419 deleted the update-rn branch April 30, 2020 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants