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

Run style checks for forks, but don't make the fixing PR #2199

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ jobs:
if: always()

fix-style:
# Check if the PR is not raised by this workflow and is not from a fork
if: startsWith(github.head_ref, 'fix-code-style') == false && github.event.pull_request.head.repo.full_name == github.repository

# Check if the PR is not raised by this workflow
if: startsWith(github.head_ref, 'fix-code-style') == false
runs-on: ubuntu-latest
container:
image: ros:foxy
Expand Down Expand Up @@ -103,7 +102,8 @@ jobs:
fi

- name: Create PR with style fixes
if: steps.style-check.outputs.changed == 'true'
# Only make the PR if the original PR is within this repo (not from a fork)
if: steps.style-check.outputs.changed == 'true' && github.event.pull_request.head.repo.full_name == github.repository
uses: peter-evans/create-pull-request@v3
with:
commit-message: "automated style fixes"
Expand Down
Loading