Open janderssonse opened 2 years ago
Hello @janderssonse I have setup this action today and ran into this issue. I think this is due to the v3 of the checkout action which does fetched only one commit (see their Readme).
I've managed to get Conform action working by setting this:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Conform action
uses: siderolabs/conform@v0.1.0-alpha.27
with:
token: ${{ secrets.GITHUB_TOKEN }}
Hope it helps.
It did, thanks!
When running a dco check on a PR, conform enforce fails with "failed to get commit message: object not found".
How to trigger:
1) Create a sample project on github. In that, include a .conform,yaml ensuring dco: true is set under policies etc.
2) Using the sidero confirm GitHub action, do a commit to main branch (with dco), see the pipeline succeeds and confirm gives success, A simple GitHub action example
3) Now, do a git checkout -b feat/my-feat, commit a valid commit. If running local conform enforce, it will succed. Then push to a new branch git push -u origin feat/my-feat etc., and make sure conform was run (on push or whatever you did set it to trigger on). Fails. Merge to main and conform will succed again (on the main branch).
So, it fails on PR to main with: failed to get commit message: object not found