cFS icon indicating copy to clipboard operation
cFS copied to clipboard

Commit format-check job doesn't run on push triggers

Open astrogeco opened this issue 3 years ago • 2 comments

Checklist (Please check before submitting)

  • [x] I reviewed the Contributing Guide.
  • [x] I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug

When a new commit is pushed the commit format checker job in the format-check workflow does not run unless the commit is part of a pull request.

To Reproduce

Create new branch Push commit with non-standard message to remote Observe "Commit check" job skip

Expected behavior

Pull request format check is skipped Commit format check executes

Code snips

https://github.com/nasa/cFS/blob/ff88a1e10d0f809887cb90b55ce76b735f24a40a/.github/workflows/format-check.yml#L69-L76

The if statement should apply to the PR check step instead of the whole job

System observed on:

Github Actions. See screenshot for example

Commit-format-check skip.png

Additional context

None

Reporter Info

Gerardo E. Cruz-Ortiz | NASA

astrogeco avatar Jun 01 '22 17:06 astrogeco

Do we need to check the commit message if it isn't part of a pull request? I push things for testing frequently that aren't ever intended for a pull request, so they don't follow the rules so it would just be noise.

skliper avatar Jun 01 '22 22:06 skliper

Do we need to check the commit message if it isn't part of a pull request? I push things for testing frequently that aren't ever intended for a pull request, so they don't follow the rules so it would just be noise.

That's a good point. I only noticed it because it didn't run on the merge to main for PRs and I wanted to see "all greens". We can close as "won't fix"

astrogeco avatar Jun 02 '22 01:06 astrogeco