CI: Add checkout options for Gerrit changes 91/73491/1
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Thu, 29 May 2025 19:23:56 +0000 (12:23 -0700)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Thu, 29 May 2025 19:23:56 +0000 (12:23 -0700)
* Uses the correct checkout options for Gerrit changes in the GitHub
  Actions workflow.
* Updates some yamllint issues
* Disables requirement for issues to be in the commit message

Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Change-Id: I7de53a0cdeffe1e5437cacf4a366abc91de5ae3d

.github/workflows/gerrit-verify.yaml
.gitlint

index 42e30e4..96f80a6 100644 (file)
@@ -98,11 +98,19 @@ jobs:
       GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
     steps:
       # Harden the runner used by this workflow
-      - uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
+      # yamllint disable-line rule:line-length
+      - uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0  # v2.12.0
         with:
           egress-policy: 'audit'
 
+      # yamllint disable-line rule:line-length
       - uses: lfit/checkout-gerrit-change-action@54d751e8bd167bc91f7d665dabe33fae87aaaa63  # v0.9
+        with:
+          gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
+          gerrit-project: ${{ inputs.GERRIT_PROJECT }}
+          gerrit-url: ${{ vars.GERRIT_URL }}
+          delay: "0s"
+          fetch-depth: 0
 
       - name: 'Build Python project'
         id: python-build
@@ -124,11 +132,19 @@ jobs:
     timeout-minutes: 12
     steps:
       # Harden the runner used by this workflow
-      - uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
+      # yamllint disable-line rule:line-length
+      - uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0  # v2.12.0
         with:
           egress-policy: audit
 
+      # yamllint disable-line rule:line-length
       - uses: lfit/checkout-gerrit-change-action@54d751e8bd167bc91f7d665dabe33fae87aaaa63  # v0.9
+        with:
+          gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
+          gerrit-project: ${{ inputs.GERRIT_PROJECT }}
+          gerrit-url: ${{ vars.GERRIT_URL }}
+          delay: "0s"
+          fetch-depth: 0
 
       - name: "Python tests [pytest] ${{ matrix.python-version }}"
         # yamllint disable-line rule:line-length
index aa389fa..fb81a13 100644 (file)
--- a/.gitlint
+++ b/.gitlint
@@ -96,5 +96,5 @@ contrib=contrib-title-conventional-commits,contrib-body-requires-signed-off-by
 types=Fix,Feat,Chore,Docs,Style,Refactor,Perf,Test,Revert,CI,Build
 
 # Require RELENG issues in commit messages
-[body-match-regex]
-regex=(.*)Issue:\s+([Ff][Ii][Xx][Ee][Ss]\s+)?[a-zA-Z0-9-]+\/[a-zA-Z0-9_-]+#\d+(.*)
+#[body-match-regex]
+#regex=(.*)Issue:\s+([Ff][Ii][Xx][Ee][Ss]\s+)?[a-zA-Z0-9-]+\/[a-zA-Z0-9_-]+#\d+(.*)