git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Adrian via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Adrian <adrian@planetcoding.net>
Subject: Re: [PATCH] ci: fix inconsistent indentation
Date: Mon, 10 Aug 2020 09:29:50 -0700	[thread overview]
Message-ID: <xmqq5z9qcvlt.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <pull.823.git.git.1597048659983.gitgitgadget@gmail.com> (Adrian via GitGitGadget's message of "Mon, 10 Aug 2020 08:37:39 +0000")

"Adrian via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Adrian Moennich <adrian@planetcoding.net>
>

Here is a good place to explain what you consider consistent and
inconsistent ...

> Signed-off-by: Adrian Moennich <adrian@planetcoding.net>
> ---

... because ...

>  jobs:
>    ci-config:
> -      runs-on: ubuntu-latest
> -      outputs:
> -        enabled: ${{ steps.check-ref.outputs.enabled }}
> -      steps:
> -        - name: try to clone ci-config branch

... the above is being very consistent.  All the direct children of
jobs.ci-config like runs-on, outputs and steps are (1) indented more
than its parent (i.e. jobs.ci-config) and (2) indented by the same
amount relative to their parent (i.e. 4 spaces).

Apparently, that is enough "consistency" CI system wants to see.  If
you want to impose extra "consistency", that is fine, but you'd need
to be more explicit about it.  Perhaps like

    All other parts of this file indent children from their parent
    by exactly two spaces, but direct children of "jobs.ci-config"
    hierarchy were indented by four spaces.  While it is not an
    error, let's be more consistent.

or something?

> -          continue-on-error: true
> -          run: |
> -            git -c protocol.version=2 clone \
> -              --no-tags \
> -              --single-branch \
> -              -b ci-config \
> -              --depth 1 \
> -              --no-checkout \
> -              --filter=blob:none \
> -              https://github.com/${{ github.repository }} \
> -              config-repo &&
> -              cd config-repo &&
> -              git checkout HEAD -- ci/config
> -        - id: check-ref
> -          name: check whether CI is enabled for ref
> -          run: |
> -            enabled=yes
> -            if test -x config-repo/ci/config/allow-ref &&
> -               ! config-repo/ci/config/allow-ref '${{ github.ref }}'
> -            then
> -              enabled=no
> -            fi
> -            echo "::set-output name=enabled::$enabled"
> +    runs-on: ubuntu-latest
> +    outputs:
> +      enabled: ${{ steps.check-ref.outputs.enabled }}
> +    steps:
> +      - name: try to clone ci-config branch
> +        continue-on-error: true
> +        run: |
> +          git -c protocol.version=2 clone \
> +            --no-tags \
> +            --single-branch \
> +            -b ci-config \
> +            --depth 1 \
> +            --no-checkout \
> +            --filter=blob:none \
> +            https://github.com/${{ github.repository }} \
> +            config-repo &&
> +            cd config-repo &&
> +            git checkout HEAD -- ci/config
> +      - id: check-ref
> +        name: check whether CI is enabled for ref
> +        run: |
> +          enabled=yes
> +          if test -x config-repo/ci/config/allow-ref &&
> +             ! config-repo/ci/config/allow-ref '${{ github.ref }}'
> +          then
> +            enabled=no
> +          fi
> +          echo "::set-output name=enabled::$enabled"
>  
>    windows-build:
>      needs: ci-config
>
> base-commit: dc04167d378fb29d30e1647ff6ff51dd182bc9a3

  reply	other threads:[~2020-08-10 16:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10  8:37 [PATCH] ci: fix inconsistent indentation Adrian via GitGitGadget
2020-08-10 16:29 ` Junio C Hamano [this message]
2020-08-21  9:27 ` [PATCH v2] " Adrian via GitGitGadget
2020-08-21 19:11   ` Junio C Hamano

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=xmqq5z9qcvlt.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=adrian@planetcoding.net \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    /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).