Skip to content

Commit

Permalink
ci: authors check using OISF repo
Browse files Browse the repository at this point in the history
As flagged critical by codescan
  • Loading branch information
catenacyber committed Feb 7, 2024
1 parent db99c45 commit 9038a7a
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9038a7a

Please sign in to comment.