Movatterモバイル変換


[0]ホーム

URL:


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

feat(parser-angular): add scope filtering option to Angular commit pa…#1216

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@asaf
Copy link

Fix: Ensure Scope Filtering is Enforced Correctly

Resolves#1215


Purpose

This PR ensures thatscope filtering logic is correctly applied whenallowed_scopes is configured inConventionalCommitParserOptions. Previously, commits without a scope were incorrectly bypassing the filtering, and commits with no allowed scopes defined were still being evaluated unnecessarily.


Rationale

  1. Ifallowed_scopesis not defined, the filtering logic should be skipped entirely to maintain the existing behavior.
  2. Ifallowed_scopesis defined, the commitmust have a valid scope that is explicitly allowed.
  3. If a commithas no scope, itshould not be allowed whenallowed_scopes is configured.

This change ensures a strict enforcement of scope filtering while keeping backwards compatibility whenallowed_scopes is not set.


How did you test?

  • Added unit tests to verify:

    • Commitswith allowed scopes pass the filter.
    • Commitswith disallowed scopes are correctly rejected.
    • Commitswithout a scope arerejected whenallowed_scopes is enabled.
    • Commitswithout anallowed_scopes definition behave as they currently do.
  • Ran the test suite and verified that existing functionality remains unchanged for users who do not configure scope filtering.


How to Verify

  1. Runpytest to ensure all tests pass.
  2. Use theConventionalCommitParser with different configurations:
    • Noallowed_scopes: Behavior remains unchanged.
    • allowed_scopes defined: Only commits with matching scopes should be allowed.
    • Commit with no scope: Should be rejected whenallowed_scopes is defined.

PR Completion Checklist

  • Reviewed & followed theContributor Guidelines
  • Changes Implemented & Validation pipeline succeeds
  • Commits follow theConventional Commits standard
    and are separated into the proper commit type and scope (recommended order: test, build, feat/fix, docs)
  • Appropriate Unit tests added/updated
  • Appropriate End-to-End tests added/updated
  • Appropriate Documentation added/updated and syntax validated for sphinx build (see Contributor Guidelines)

@codejedi365
Copy link
Contributor

codejedi365 commentedMar 14, 2025
edited
Loading

This is already solved in#1143, but thank you for putting in the time to provide a solution.

@asaf
Copy link
Author

Closing in favor of the monorepo parser introduced in#1143

codejedi365 reacted with thumbs up emoji

@asafasaf closed thisMar 15, 2025
@asafasaf deleted the feat/issue1215 branchMarch 15, 2025 21:54
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Improve support for monorepo using Conventional Commits scope

2 participants

@asaf@codejedi365

[8]ページ先頭

©2009-2025 Movatter.jp