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

commitlint orb is generating fatal: unknown commit main error #7

Open
natanans opened this issue Oct 11, 2022 · 1 comment
Open

commitlint orb is generating fatal: unknown commit main error #7

natanans opened this issue Oct 11, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@natanans
Copy link

natanans commented Oct 11, 2022

Orb version:

1.0.0

What happened:

The circle ci workflow generates the error that I attached. I also saw that the repo for commitlint repo has a failed circle ci so am gussing there is an issue.

Expected behavior:

It should have linted my commit messages but it just generates the error above and exit

Additional Information:

image

@natanans natanans added the bug Something isn't working label Oct 11, 2022
@ScarellaDev
Copy link

ScarellaDev commented Mar 1, 2023

@natanans FYI I had the exact same bug after switching our default branch from main to develop because the commitlint/lint job uses a target-branch parameter that uses the default value main if no value is passed (src: https://github.com/conventional-changelog/commitlint-orb/blob/main/src/jobs/lint.yml)

To fix it, you need to pass the target-branch parameter to your job like this:

      - commitlint/lint:
          target-branch: << pipeline.git.branch >>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants