Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions fixtures/all-versions.github
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand Down
1 change: 1 addition & 0 deletions fixtures/conditionals.github
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand Down
1 change: 1 addition & 0 deletions fixtures/copy-fields-all.github
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand Down
1 change: 1 addition & 0 deletions fixtures/copy-fields-none.github
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand Down
1 change: 1 addition & 0 deletions fixtures/copy-fields-some.github
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand Down
1 change: 1 addition & 0 deletions fixtures/doctest-version.github
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand Down
1 change: 1 addition & 0 deletions fixtures/doctest.github
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand Down
1 change: 1 addition & 0 deletions fixtures/empty-line.github
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand Down
1 change: 1 addition & 0 deletions fixtures/enabled-jobs.github
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand Down
1 change: 1 addition & 0 deletions fixtures/fail-versions.github
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand Down
1 change: 1 addition & 0 deletions fixtures/irc-channels.github
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
irc:
name: Haskell-CI (IRC notification)
Expand Down
1 change: 1 addition & 0 deletions fixtures/messy.github
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand Down
1 change: 1 addition & 0 deletions fixtures/psql.github
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand Down
1 change: 1 addition & 0 deletions fixtures/travis-patch.github
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand Down
3 changes: 2 additions & 1 deletion src/HaskellCI/GitHub/Yaml.hs
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,12 @@ instance ToYaml GitHub where
instance ToYaml GitHubOn where
toYaml GitHubOn {..}
| null ghBranches
= ylistFilt [] ["push", "pull_request"]
= ylistFilt [] ["push", "pull_request", "merge_group"]
| otherwise
= ykeyValuesFilt []
[ "push" ~> branches
, "pull_request" ~> branches
, "merge_group" ~> branches
]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do just

    toYaml GitHubOn {..}
        | null ghBranches
        = ylistFilt [] ["push", "pull_request","merge_queue"]
        | otherwise
        = ykeyValuesFilt []
              [ "push"         ~> branches
              , "pull_request" ~> branches
              , "merge_queue"  ~> branches
              ]

I don't see a reason to not simply always enable merge_queue.

And I especially don't like that merge_queue with branches doesn't configure branches.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, that's a simpler change. I was under the impression that the merge_group trigger had no branches filter, since it's not documented anywhere

Copy link
Collaborator

@phadej phadej Aug 28, 2025

Choose a reason for hiding this comment

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

It's unclear. The GHA YAML doesn't have proper schema, and the documentation is sparse and spread out. The docs are bad.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems to work fine with the branches filter on well-typed/hs-bindgen#1025

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, I've updated the PR

where
branches = ykeyValuesFilt []
Expand Down
Loading