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

fix: Allow non-pr runs to pass ci #1839

Merged
merged 6 commits into from Apr 10, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/qc/action.yml
Expand Up @@ -17,7 +17,12 @@ runs:
shell: bash
run: |
set -ex
echo ${{ github.event.pull_request.title }} | awk "/(^feat:)|(^fix:)|(^doc:)|(^perf:)|(^refactor:)|(^style:)|(^test:)|(^chore:)|(^revert:)|(^build:)/" | grep .
TITLE="${{ github.event.pull_request.title }}"
if [ -z "$TITLE" ]
then
TITLE=Continuous
fi
echo $TITLE | awk "/(Continuous)|(^feat:)|(^fix:)|(^doc:)|(^perf:)|(^refactor:)|(^style:)|(^test:)|(^chore:)|(^revert:)|(^build:)/" | grep .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an alternative suggestion, but you could avoid the if/else title set and check by adding if: github.event_name == 'pull_request' on to the step perhaps?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trisyoungs That had been my original idea, but I was paranoid that I wouldn't be able to test it. However, looking at it again, you're right that the simplicity makes it worth the change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rprospero Sometimes its hard to have faith in the mess that is GitHub if checks, but live dangerously I say!


- name: C++ Formatting
shell: bash
Expand Down