git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Jeff King <peff@peff.net>, 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: Thu, 7 Sep 2023 11:04:33 +0100	[thread overview]
Message-ID: <fcdc682b-cf6c-4db9-9970-be136f48de58@gmail.com> (raw)
In-Reply-To: <20230905072444.GH199565@coredump.intra.peff.net>

On 05/09/2023 08:24, Jeff King wrote:
> On Mon, Sep 04, 2023 at 10:56:15AM +0100, Phillip Wood wrote:
> 
>>> Yes, I think it would be possible to do something like:
>>>
>>>     if: |
>>>       (vars.CI_BRANCHES == '' || contains(vars.CI_BRANCHES, github.ref_name)) &&
>>>       !contains(vars.CI_BRANCHES_REJECT, github.ref_name)
>>>
>>> It doesn't allow globbing, though. Do you need that?
>>
>> Oh I'd missed that, yes I do. All the globs are prefix matches but I'm not
>> sure that helps.
> 
> It does make it easier. There's no globbing function available to us,
> but if we know something is a prefix, there's a startsWith() we can use.
> It does seem we're getting a combinatorial expansion of things to check,
> though:
> 
>    - full names to accept
>    - full names to reject
>    - prefixes to accept
>    - prefixes to reject
> 
> I wrote "prefixes" but I'm actually not sure how feasible that is. That
> implies iterating over the list of prefixes, which I'm not sure we can
> do.

I scanned the github documentation the other day and wondered if it 
would be possible to use with fromJson with a json array to do a prefx 
match on each element. It all sounds like it is getting a bit 
complicated though.

Best Wishes

Phillip

> -Peff


  reply	other threads:[~2023-09-07 15:26 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 [this message]
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
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=fcdc682b-cf6c-4db9-9970-be136f48de58@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --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).