git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: phillip.wood@dunelm.org.uk
Cc: git@vger.kernel.org, Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH 0/2] replacing ci/config/allow-ref with a repo variable
Date: Wed, 13 Sep 2023 20:44:06 -0400	[thread overview]
Message-ID: <20230914004406.GA2224848@coredump.intra.peff.net> (raw)
In-Reply-To: <20230914003010.GA1709842@coredump.intra.peff.net>

Two minor corrections in what I wrote...

On Wed, Sep 13, 2023 at 08:30:10PM -0400, Jeff King wrote:

> (BTW, one other thing I tried was using fromJSON(vars.CI_CONFIG) in the
> "on" expression, which in theory would allow globbing. But it doesn't
> look like expressions work at all in that context. And even if they did,
> I'm not sure we could make it work such that an empty CI_CONFIG used
> some defaults, since there's no conditional-expression ternary
> operator).

It's not a real ?: operator, but GitHub does use the word "ternary" to
describe the short-circuit behavior of:

  condition && "if-true" || "if-not-true"

So in theory we could do:

  on: ${{ fromJSON(var.CI_ON != '' && vars.CI_ON || "[pull_request, push]" }}

but I couldn't make it work (it complains about the value of "on" in
such a way that I assume it is simply not expanding expressions at all).

> We have the necessary bits at the protocol: push-options. But it's up to
> the server-side hooks to decide which ones are meaningful and to do
> something useful with them. It looks like GitLab supports:
> 
>   git push -o ci.skip=1 ...
> 
> but I don't think GitHub respects any equivalent option.

The syntax here is actually just "git push -o ci.skip", without the
equals.

-Peff

  reply	other threads:[~2023-09-14  0:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-30 19:49 [PATCH 0/2] replacing ci/config/allow-ref with a repo variable Jeff King
2023-08-30 19:51 ` [PATCH 1/2] ci: allow branch selection through "vars" Jeff King
2023-09-03  8:59   ` Johannes Schindelin
2023-09-05  7:30     ` Jeff King
2023-09-05 10:51       ` Johannes Schindelin
2023-09-07  7:47         ` Jeff King
2023-08-30 19:51 ` [PATCH 2/2] ci: deprecate ci/config/allow-ref script Jeff King
2023-08-30 22:55 ` [PATCH 0/2] replacing ci/config/allow-ref with a repo variable Junio C Hamano
2023-09-01 13:24 ` Phillip Wood
2023-09-01 17:32   ` Jeff King
2023-09-04  9:56     ` Phillip Wood
2023-09-05  7:24       ` Jeff King
2023-09-07 10:04         ` Phillip Wood
2023-09-11  9:36           ` Jeff King
2023-09-13 15:16             ` Phillip Wood
2023-09-14  0:30               ` Jeff King
2023-09-14  0:44                 ` Jeff King [this message]
2023-09-14 10:49                 ` Phillip Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230914004406.GA2224848@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).