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

[#223] Ignore Danger run on WIP pull request #432

Merged
merged 7 commits into from
Jul 17, 2023
3 changes: 2 additions & 1 deletion .template/addons/github/.github/workflows/test.yml.tt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Test

on:
pull_request:
types: [opened, edited, labeled, unlabeled, converted_to_draft, ready_for_review]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to be so specific? Can't this be triggered just with pull_request?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching the issue. Come to think of it, we don't really need an immediate workflow trigger after a PR state change, as no code has been changed.

And, just pull_request gets the job done where we make an existing open PR WIP and push commits in it; for each subsequent commit, it skips danger.

Fixed in d5fc88d

push:
branches:
- develop
Expand Down Expand Up @@ -144,7 +145,7 @@ jobs:
needs: unit_tests
runs-on: ubuntu-latest
timeout-minutes: 5
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' && !contains(join(github.event.pull_request.labels.*.name, ','), 'wip') && !contains(github.event.pull_request.title, '[wip]') && !github.event.pull_request.draft
tyrro marked this conversation as resolved.
Show resolved Hide resolved
tyrro marked this conversation as resolved.
Show resolved Hide resolved
tyrro marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@v3
with:
Expand Down