1. 12

    1. 6

      I miss Bors-NG…

      https://mergify.com/ is better than Github Merge Queue, but still not the same as Bors.

      1. 4

        Just curious, what do you miss in Bors you don’t find in Mergify?

        1. 1

          I like how Bors pushes the changes into a “staging” branch before merging. It makes it easy to run expensive integration tests only at that point. It also supports timeouts and it is open source.

          1. 2

            GHMQs also use a temporary branch to do the testing and support timeouts.

          2. 2

            Thanks for the answer! Those features are also supported by Mergify; we call that two-step CI: https://docs.mergify.com/merge-queue/two-step/. And it also supports timeouts for the record.

    2. 3

      I’m trying to get my team on Gitlab to switch to merge queues. This is a helpful article, I bet we can get something similar to work.

    3. 3

      Thanks for posting this! It prompted me to write up what I learned working the GH merge queue at my previous job: https://boinkor.net/2023/11/neat-github-actions-patterns-for-github-merge-queues/ - in short, you can in fact have different sets of test jobs run at different times (on the queue and off). It’s annoying as hell to write all that YAML, but it is possible.

      1. 2

        It’s becoming even more clear that GHMQs could do with a few tweaks for usability sake!

      2. 1

        jq '. | to_entries | map([.value.result == "success", .value.result == "skipped"] | any) | all'

        How about this?

        jq 'map(.result == "success" or .result == "skipped") | all'

        [] and map operate on objects as well as arrays, producing all of the values and ignoring the keys, so there’s no need for a to_entries that only uses .value of each entry.

        For jq 1.6+ you can also do

        jq 'map(.result | IN("success", "skipped")) | all'


        jq 'map(IN(.result; "success", "skipped")) | all'

        if you prefer (note that IN is a different operator from in), but I think the version with or reads best when there are only two options.

        1. 1

          Also I’m 99% sure you could combine the “transform outcomes” and “check outcomes” steps (and simplify the shell stuff) using jq --exit-status. true and false as last output values get mapped to 0 and 1 exit codes respectively.

          1. 1

            You absolutely can, but splitting the steps makes it easier to see the outcome yourself in the GitHub actions ui. If they’re combined, you have to rely on printing the value somehow (eg, via set -x), but split up, the value being worked with is in the step context’s list of environment variables.