git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] ci: fix inconsistent indentation
@ 2020-08-10  8:37 Adrian via GitGitGadget
  2020-08-10 16:29 ` Junio C Hamano
  2020-08-21  9:27 ` [PATCH v2] " Adrian via GitGitGadget
  0 siblings, 2 replies; 4+ messages in thread
From: Adrian via GitGitGadget @ 2020-08-10  8:37 UTC (permalink / raw)
  To: git; +Cc: Adrian, Adrian Moennich

From: Adrian Moennich <adrian@planetcoding.net>

Signed-off-by: Adrian Moennich <adrian@planetcoding.net>
---
    Fix inconsistent yaml indentation

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-823%2FThiefMaster%2Fpatch-1-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-823/ThiefMaster/patch-1-v1
Pull-Request: https://github.com/git/git/pull/823

 .github/workflows/main.yml | 56 +++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 84a5dcff7a..5bd321e5e1 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -7,34 +7,34 @@ env:
 
 jobs:
   ci-config:
-      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"
+    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
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ci: fix inconsistent indentation
  2020-08-10  8:37 [PATCH] ci: fix inconsistent indentation Adrian via GitGitGadget
@ 2020-08-10 16:29 ` Junio C Hamano
  2020-08-21  9:27 ` [PATCH v2] " Adrian via GitGitGadget
  1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2020-08-10 16:29 UTC (permalink / raw)
  To: Adrian via GitGitGadget; +Cc: git, Adrian

"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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] ci: fix inconsistent indentation
  2020-08-10  8:37 [PATCH] ci: fix inconsistent indentation Adrian via GitGitGadget
  2020-08-10 16:29 ` Junio C Hamano
@ 2020-08-21  9:27 ` Adrian via GitGitGadget
  2020-08-21 19:11   ` Junio C Hamano
  1 sibling, 1 reply; 4+ messages in thread
From: Adrian via GitGitGadget @ 2020-08-21  9:27 UTC (permalink / raw)
  To: git; +Cc: Adrian, Adrian Moennich

From: Adrian Moennich <adrian@planetcoding.net>

While YAML allows different indentation styles as long as each block is
consistent, it is rather unusual to mix different indentations in a
single file.  Therefor I unified the file to use two-space indentation
everywhere.

Signed-off-by: Adrian Moennich <adrian@planetcoding.net>
---
    Fix inconsistent yaml indentation

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-823%2FThiefMaster%2Fpatch-1-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-823/ThiefMaster/patch-1-v2
Pull-Request: https://github.com/git/git/pull/823

Range-diff vs v1:

 1:  5301e3842e ! 1:  d398122a6a ci: fix inconsistent indentation
     @@ Metadata
       ## Commit message ##
          ci: fix inconsistent indentation
      
     +    While YAML allows different indentation styles as long as each block is
     +    consistent, it is rather unusual to mix different indentations in a
     +    single file.  Therefor I unified the file to use two-space indentation
     +    everywhere.
     +
          Signed-off-by: Adrian Moennich <adrian@planetcoding.net>
      
       ## .github/workflows/main.yml ##


 .github/workflows/main.yml | 56 +++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 44e0fe5839..30425404eb 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -7,34 +7,34 @@ env:
 
 jobs:
   ci-config:
-      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"
+    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: 675a4aaf3b226c0089108221b96559e0baae5de9
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ci: fix inconsistent indentation
  2020-08-21  9:27 ` [PATCH v2] " Adrian via GitGitGadget
@ 2020-08-21 19:11   ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2020-08-21 19:11 UTC (permalink / raw)
  To: Adrian via GitGitGadget; +Cc: git, Adrian

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-21 19:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10  8:37 [PATCH] ci: fix inconsistent indentation Adrian via GitGitGadget
2020-08-10 16:29 ` Junio C Hamano
2020-08-21  9:27 ` [PATCH v2] " Adrian via GitGitGadget
2020-08-21 19:11   ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).