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

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

Open
2 tasks done
astrogeco opened this issue Jun 1, 2022 · 2 comments
Open
2 tasks done

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

astrogeco opened this issue Jun 1, 2022 · 2 comments

Comments

@astrogeco
Copy link
Contributor

astrogeco commented Jun 1, 2022

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • 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

check-commit-message:
name: Check Commit Message
needs: check-for-duplicates
# Only run for pull-requests.
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-18.04
timeout-minutes: 15
steps:

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

@skliper
Copy link
Contributor

skliper commented Jun 1, 2022

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.

@astrogeco
Copy link
Contributor Author

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants