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

Sign tag #522

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

Merged
Lee-W merged 27 commits into commitizen-tools:master from gpongelli:sign_tag
Jul 22, 2022
Merged

Sign tag #522

Lee-W merged 27 commits into commitizen-tools:master from gpongelli:sign_tag
Jul 22, 2022

Conversation

Copy link
Contributor

@gpongelli gpongelli commented Jun 9, 2022

Description

Add tag sign feature for bump command.

Checklist

  • Add test cases to all the changes you introduce
  • Run ./scripts/format and ./scripts/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes

Expected behavior

When added the --signed-tag, bump command will sign the tag with preconfigured GPG private key.

Steps to Test This Pull Request

  1. run cz bump --signed-tag <tag>
  2. check with git tag -v <tag> that the stdout answer starts with gpg: Signature made string

A new method to check if the tag is signed was added to do same step of point 2 above.

Additional context

Copy link
Contributor Author

gpongelli commented Jun 10, 2022
edited
Loading

(削除) pipeline error seems nothing related to my changes, please let me know how to retry the jobs or how to fix them. (削除ここまで)

Copy link

codecov bot commented Jun 13, 2022
edited
Loading

Codecov Report

Merging #522 (5ed4d43) into master (7b69599) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@ Coverage Diff @@
## master #522 +/- ##
==========================================
+ Coverage 97.92% 98.01% +0.09% 
==========================================
 Files 39 39 
 Lines 1540 1565 +25 
==========================================
+ Hits 1508 1534 +26 
+ Misses 32 31 -1 
Flag Coverage Δ
unittests 98.01% <100.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
commitizen/cli.py 93.93% <ø> (ø)
commitizen/commands/init.py 91.66% <ø> (ø)
commitizen/__version__.py 100.00% <100.00%> (ø)
commitizen/cmd.py 100.00% <100.00%> (ø)
commitizen/commands/bump.py 96.42% <100.00%> (+1.23%) ⬆️
commitizen/commands/check.py 100.00% <100.00%> (ø)
commitizen/cz/__init__.py 100.00% <100.00%> (ø)
commitizen/defaults.py 100.00% <100.00%> (ø)
commitizen/git.py 100.00% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update afa0d93...5ed4d43. Read the comment docs.

Copy link
Contributor Author

pipeline fixed, @woile @Lee-W please review this PR, thanks.

@gpongelli gpongelli requested review from woile and Lee-W July 14, 2022 17:10
Copy link
Member

woile commented Jul 15, 2022

Awesome work @gpongelli 💪🏻

gpongelli reacted with laugh emoji

Copy link
Member

@woile woile left a comment

Choose a reason for hiding this comment

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

@Lee-W looks good to me, if you are ok with it we merge

gpongelli reacted with thumbs up emoji
Copy link
Contributor Author

@woile what do you think about this comment ?

return_code = process.returncode
return Command(stdout.decode(), stderr.decode(), stdout, stderr, return_code)
return Command(
stdout.decode(chardet.detect(stdout)["encoding"] or "utf-8"),
Copy link
Member

Choose a reason for hiding this comment

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

What's the expected output of chardet.detect if it cannot detect anything? Will it be something like {'encoding': None, 'confidence': 0.99}?

Copy link
Contributor Author

@gpongelli gpongelli Jul 22, 2022

Choose a reason for hiding this comment

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

What's the expected output of chardet.detect if it cannot detect anything? Will it be something like {'encoding': None, 'confidence': 0.99}?

Yes, it returns None, that's why I've added the or clause.

It also returns None for empty content b'', like the stderr content when all goes ok, so the or is mandatory to avoid decode failures.

Let me know if this "chardet-enabled" version is ok or if you prefer the previous one (with "iso..." encoding).

Copy link
Member

Choose a reason for hiding this comment

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

just confirm it. I like the chatdet idea.

@gpongelli gpongelli requested a review from Lee-W July 22, 2022 15:06
Copy link
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! let's merge it and release a new version 🎉🎉🎉

gpongelli and woile reacted with hooray emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@woile woile woile approved these changes

@Lee-W Lee-W Lee-W approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /