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

chore(tests): don't check last commit #619

Merged
merged 2 commits into from
Apr 21, 2024
Merged

chore(tests): don't check last commit #619

merged 2 commits into from
Apr 21, 2024

Conversation

MarcoIeni
Copy link
Contributor

@MarcoIeni MarcoIeni commented Apr 21, 2024

Description

Don't check if last commit is conventional.

Motivation and Context

Having the PR checks failing because one of the commits is not conventional is annoying for contributors. Original feedback: #613 (comment)

How Has This Been Tested?

I pushed fc58c87 to this PR. It's not a conventional commit and the tests still work.

Screenshots / Logs (if applicable)

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

unreachable!()
}
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this check. I'm sure that the ability to parse a commit to conventional is well tested elsewhere.

@codecov-commenter
Copy link

codecov-commenter commented Apr 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.52%. Comparing base (d53b905) to head (fc58c87).
Report is 177 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #619   +/-   ##
=======================================
  Coverage   41.52%   41.52%           
=======================================
  Files          15       15           
  Lines        1072     1072           
=======================================
  Hits          445      445           
  Misses        627      627           
Flag Coverage Δ
unit-tests 41.52% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MarcoIeni MarcoIeni marked this pull request as ready for review April 21, 2024 14:00
@MarcoIeni MarcoIeni requested a review from orhun as a code owner April 21, 2024 14:00
@Cyclonit
Copy link
Contributor

Cyclonit commented Apr 21, 2024

I strongly disagree that this should become default behaviour. In my organization, we want to enforce sticking to standards at all times. Every commit will at some point no longer be the latest and having the checks fail at that stage is more annoying that doing it right from the start.

Instead the controls on how to handle non-conventional commits should be more fine grained:

  1. Ignore non-conventional commits
    git-cliff silently ignores all non-conventional commits.

  2. Warn non-conventional commits
    git-cliff emits a warning for each non-conventional commit it encountered.

  3. Enforce conventional commits
    git-cliff fails generating a changelog if it encounters any non-conventional commits. Every non-conventional commit is emitted as an error.

I just noticed that this would not change the general behaviour but it only affects your test...

@orhun orhun merged commit 68b9839 into orhun:main Apr 21, 2024
44 checks passed
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.

4 participants