8000 feat(check): allow running check on commit range by SanchithHegde · Pull Request #286 · cocogitto/cocogitto · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(check): allow running check on commit range #286

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
merged 3 commits into from
May 20, 2023
Merged

feat(check): allow running check on commit range #286

merged 3 commits into from
May 20, 2023

Conversation

SanchithHegde
Copy link
Contributor

Closes #284.

The changes included in this PR allows accepting the commit range as an optional CLI argument. However, clap would raise an error if both --from-latest-tag and commit range are specified. This PR also includes some unit tests, let me know if any more tests are needed.

A problem that I see with the current implementation is that parsing a commit range from a string panics if the string is of an invalid format (check the From<&str> implementation of RevspecPattern). This would be a bad experience for the users. We should consider implementing FromStr or TryFrom instead, and raise an error instead of panicking. Depending on what's preferable, I can take this up on a separate PR.

@codecov
Copy link
codecov bot commented May 20, 2023

Codecov Report

Merging #286 (c2912bd) into main (4a6a8b3) will increase coverage by 0.00%.
The diff coverage is 85.71%.

@@           Coverage Diff           @@
##             main     #286   +/-   ##
=======================================
  Coverage   85.73%   85.73%           
=======================================
  Files          43       43           
  Lines        5992     6002   +10     
=======================================
+ Hits         5137     5146    +9     
- Misses        855      856    +1     
Impacted Files Coverage Δ
src/bin/cog/main.rs 47.88% <50.00%> (+0.01%) ⬆️
src/command/check.rs 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cocogitto-bot
Copy link
cocogitto-bot bot commented May 20, 2023

✔️ 5314494...c2912bd - Conventional commits check succeeded.

@oknozor
Copy link
Collaborator
oknozor commented May 20, 2023

Good job @SanchithHegde !

If you want to make another PR for the error handling don't hesitate to add yourself to the contributor list in cog.toml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Allow running cog check on a commit range
2 participants
0