]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
ci: authors check using OISF repo
authorPhilippe Antoine <pantoine@oisf.net>
Wed, 7 Feb 2024 20:54:28 +0000 (21:54 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 9 Feb 2024 10:24:03 +0000 (11:24 +0100)
As flagged critical by codescan

.github/workflows/authors.yml

index 3fee4c5a2fde59317cbcd0a253019457b45b9431..5c4702a13858c2b20a5db112c3810e46297bc077 100644 (file)
@@ -8,20 +8,16 @@ jobs:
     name: New Author Check
     runs-on: ubuntu-latest
     steps:
+      - name: Checkout PR code
+        uses: actions/checkout@v3
+        with:
+          ref: ${{ github.event.pull_request.head.sha }}
+          fetch-depth: 0
       - run: sudo apt -y install git
-      - run: git clone https://github.com/${{ github.repository }}
-      - run: git remote add author ${{ github.event.pull_request.head.repo.html_url }}
-        working-directory: suricata
-      - run: git fetch author
-        working-directory: suricata
-      - run: git checkout author/${{ github.event.pull_request.head.ref }}
-        working-directory: suricata
       - name: Export known authors from master branch
-        run: git log --format="%an <%ae>" origin/master | sort | uniq > ../authors.txt
-        working-directory: suricata
+        run: git log --format="%an <%ae>" origin/master | sort | uniq > authors.txt
       - name: Export authors from new commits
-        run: git log --format="%an <%ae>" origin/${GITHUB_BASE_REF}... | sort | uniq > ../commit-authors.txt
-        working-directory: suricata
+        run: git log --format="%an <%ae>" origin/${GITHUB_BASE_REF}... | sort | uniq > commit-authors.txt
       - name: Check new authors
         run: |
           touch new-authors.txt