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 support tag checker #33

Merged
merged 6 commits into from
Feb 15, 2021

Conversation

tsuyoshicho
Copy link
Contributor

Close #29.

  • Add tag param (default off and false)
  • Use git ls-remote --tags
  • Treat refs list
  • Add test case/test data and test PR create
  • Update README

entrypoint.sh Outdated Show resolved Hide resolved
entrypoint.sh Outdated
jq -r '.[] | .tag_name' | \
grep -oP '\d+\.\d+(\.\d+)?(-[^'\''\"\s]*)?$' | \
list_versions | \
grep -oP '\d+\.\d+(\.\d+)*(-[^'\''\"\s]*)?$' | \
Copy link
Member

Choose a reason for hiding this comment

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

oh, wait. I noticed that you changed the regex too.
Can you revert the change or explain why you updated the regex?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why

Some tags have been given a small version that deviates from the rules of semver, so I changed it.

Validity of change

Because, previouse commit split release(semver valid) and tag (semver deviate).

First, I think non-semver ruling tag(x.y.z.?) ignoring rule...but test case support non-semver(for -hoge suffix).
And I tried to support it.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm... I guess I don't get it. Can you list actual real-world examples who uses x.y.z.??

Also, this repo doesn't intend to support non-semver in the first place, so can you propose a change separately?

Copy link
Member

Choose a reason for hiding this comment

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

Note that -xyz suffix is actually valid semver. https://semver.org/#spec-item-10

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I get it. Hmm... 1.5.2.1 is a super weird tag name...

Ideally, I'd reject such inputs, but maybe it's fine to accept. I left a suggestion to make the regex simpler but LGTM other than that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree.
x.y.z.a ... can be simply drop away.

entrypoint.sh Outdated Show resolved Hide resolved
entrypoint.sh Outdated
jq -r '.[] | .tag_name' | \
grep -oP '\d+\.\d+(\.\d+)?(-[^'\''\"\s]*)?$' | \
list_versions | \
grep -oP '\d+\.\d+(\.\d+)*(-[^'\''\"\s]*)?$' | \
Copy link
Member

Choose a reason for hiding this comment

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

Oh, I get it. Hmm... 1.5.2.1 is a super weird tag name...

Ideally, I'd reject such inputs, but maybe it's fine to accept. I left a suggestion to make the regex simpler but LGTM other than that.

@haya14busa haya14busa merged commit 5a81c43 into reviewdog:master Feb 15, 2021
@haya14busa
Copy link
Member

Thanks 👍

@github-actions
Copy link

🚀 [bumpr] Bumped! New version:v1.3.0 Changes:v1.2.2...v1.3.0

@tsuyoshicho tsuyoshicho deleted the feature/remotetags-20210214 branch February 15, 2021 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: tagged with semantic versioning but not released , tag detection support
2 participants