Closed mikael-andersson91 closed 1 year ago
I missed an obvious part as noted in the documentation example for the Jira pipeline, I needed to provide ref and fetch-depth on the actions/checkout step.
commitsar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Commitsar Action
uses: aevea/commitsar@v0.20.2
with:
config: ${{ github.workspace }}/.commitsar.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
I am currently using version 0.20.2 of the Commitsar GitHub Action, and I'm attempting to use the pull request pipeline to enforce conventional commit standards on pull requests. I am consistently getting these errors when running it:
⨯ pipeline: commit-pipeline, error: reference not found ⨯ pipeline: pr-pipeline, error: no linked PullRequests found
GitHub Actions workflow file: https://github.com/mikael-andersson91/pull-request-management/blob/main/.github/workflows/pr-management.yml#L29
Example pull request: https://github.com/mikael-andersson91/pull-request-management/pull/23
Config file: https://github.com/mikael-andersson91/pull-request-management/blob/main/.commitsar.yaml
Example job: https://github.com/mikael-andersson91/pull-request-management/actions/runs/5444549809/jobs/9902551100?pr=23
Is there a bug here or am I just missing something obvious here?
Also, is it possible to run this with a configuration utilizing both the pull_request and commits pipelines at the same time? The usecase being for a team just getting used to conventional commits, where a squash merge on the pull request would give a conventional commit compliant commit.