git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v5 0/1] ci: new github-action for git-l10n code review

From
Jiang Xin <worldhello.net@gmail.com>
Date
Sep 9, 2021, 09:09 UTC
Message-ID
<20210909090927.66336-1-worldhello.net@gmail.com>
In-Reply-To
<20210902023139.89251-1-worldhello.net@gmail.com>
From: Jiang Xin <zhiyou.jx@alibaba-inc.com>
## Changes since v4
* "git-po-helper check-commits" can work with bare repository now. So do not use
  "actions/checkout@v2" to prepare workspace any more.
* "git-po-helper learned how to fetch missing blobs in a batch. So do a blobless
  partial clone.
## range-diff v4...v5
1:  0067ccc ! 1:  1c43d6b ci: new github-action for git-l10n code review
    @@ .github/workflows/l10n.yml (new)
     +    permissions:
     +      pull-requests: write
     +    steps:
    -+      - uses: actions/checkout@v2
    -+        with:
    -+          fetch-depth: '1'
    -+      - name: Fetch missing commits
    -+        id: fetch-commits
    ++      - name: Setup base and head objects
    ++        id: setup-tips
     +        run: |
     +          if test "${{ github.event_name }}" = "pull_request_target"
     +          then
    @@ .github/workflows/l10n.yml (new)
     +            base=${{ github.event.before }}
     +            head=${{ github.event.after }}
     +          fi
    ++          echo "::set-output name=base::$base"
    ++          echo "::set-output name=head::$head"
    ++      - name: Run partial clone
    ++        run: |
    ++          git -c init.defaultBranch=master init --bare .
    ++          git remote add \
    ++            --mirror=fetch \
    ++            origin \
    ++            https://github.com/${{ github.repository }}
    ++          # Fetch tips that may be unreachable from github.ref:
    ++          # - For a forced push, "$base" may be unreachable.
    ++          # - For a "pull_request_target" event, "$head" may be unreachable.
     +          args=
    -+          for commit in $base $head
    ++          for commit in \
    ++            ${{ steps.setup-tips.outputs.base }} \
    ++            ${{ steps.setup-tips.outputs.head }}
     +          do
     +            case $commit in
     +            *[^0]*)
     +              args="$args $commit"
     +              ;;
     +            *)
    -+              # Ignore ZERO-OID.
    ++              # Should not fetch ZERO-OID.
     +              ;;
     +            esac
     +          done
    -+          # Unshallow the repository, and fetch missing commits using partial
    -+          # clone.  "$base" may be missing due to forced push, and "$head"
    -+          # may be missing due to the "pull_request_target" event.
    -+          git fetch --unshallow --filter=blob:none origin $args
    -+          echo "::set-output name=base::$base"
    -+          echo "::set-output name=head::$head"
    ++          git -c protocol.version=2 fetch \
    ++            --progress \
    ++            --no-tags \
    ++            --no-write-fetch-head \
    ++            --filter=blob:none \
    ++            origin \
    ++            ${{ github.ref }} \
    ++            $args
     +      - uses: actions/setup-go@v2
     +        with:
     +          go-version: '>=1.16'
    @@ .github/workflows/l10n.yml (new)
     +        run: |
     +          exit_code=0
     +          git-po-helper check-commits \
    -+              --github-action-event="${{ github.event_name }}" -- \
    -+              ${{ steps.fetch-commits.outputs.base }}..${{ steps.fetch-commits.outputs.head }} \
    -+              >git-po-helper.out 2>&1 ||
    -+            exit_code=$?
    ++            --github-action-event="${{ github.event_name }}" -- \
    ++            ${{ steps.setup-tips.outputs.base }}..${{ steps.setup-tips.outputs.head }} \
    ++            >git-po-helper.out 2>&1 || exit_code=$?
     +          if test $exit_code -ne 0 || grep -q WARNING git-po-helper.out
     +          then
     +            # Remove ANSI colors which are proper for console logs but not
----
Jiang Xin (1):
  ci: new github-action for git-l10n code review
 .github/workflows/l10n.yml | 105 +++++++++++++++++++++++++++++++++++++
 1 file changed, 105 insertions(+)
 create mode 100644 .github/workflows/l10n.yml
-- 
2.33.0
Previous: Jiang XinNext: Jiang Xin
Message 21 of 24 in “ci: new github-action for git-l10n code review”
  1. 0/1 ci: new github-action for git-l10n code reviewJiang Xin, Aug 22, 2021
  2. 1/1 ci: new github-action for git-l10n code reviewJiang Xin, Aug 22, 2021
  3. Bagas SanjayaAug 23, 2021
  4. Jiang XinAug 23, 2021
  5. Johannes SchindelinAug 23, 2021
  6. Junio C HamanoAug 23, 2021
  7. Johannes SchindelinAug 24, 2021
  8. Junio C HamanoAug 24, 2021
  9. Jean-Noël AVILAAug 24, 2021
  10. Jiang XinAug 31, 2021
  11. Jiang XinAug 24, 2021
  12. Junio C HamanoAug 24, 2021
  13. Jiang XinAug 24, 2021
  14. Johannes SchindelinAug 25, 2021
  15. Jiang XinAug 26, 2021
  16. Jeff KingAug 27, 2021
  17. Jiang XinAug 27, 2021
  18. ci: new github-action for git-l10n code reviewJiang Xin, Aug 27, 2021
  19. 1/1 ci: new github-action for git-l10n code reviewJiang Xin, Sep 2, 2021
  20. 0/1 ci: new github-action for git-l10n code reviewJiang Xin, Sep 2, 2021
  21. 0/1 ci: new github-action for git-l10n code reviewJiang Xin, Sep 9, 2021
  22. 1/1 ci: new github-action for git-l10n code reviewJiang Xin, Sep 9, 2021
  23. 1/1 ci: new github-action for git-l10n code reviewJiang Xin, Aug 23, 2021
  24. 0/1 ci: new github-action for git-l10n code reviewJiang Xin, Aug 23, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.