mirror of
https://github.com/OISF/suricata.git
synced 2026-06-11 01:42:01 -04:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2 to 6.0.3. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](https://github.com/actions/checkout/compare/v6.0.2...v6.0.3) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
48 lines
1.6 KiB
YAML
48 lines
1.6 KiB
YAML
name: New Authors Check
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
permissions: read-all
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check-id:
|
|
name: New Author Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout PR code
|
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
fetch-depth: 0
|
|
- run: sudo apt -y install git
|
|
- name: Export known authors from main branch
|
|
run: git log --format="%an <%ae>" origin/main | sort | uniq > authors.txt
|
|
- name: Export authors from new commits
|
|
run: git log --format="%an <%ae>" ${{ github.event.pull_request.base.sha }}... | sort | uniq > commit-authors.txt
|
|
- name: Check new authors
|
|
run: |
|
|
touch new-authors.txt
|
|
while read -r author; do
|
|
echo "Checking author: ${author}"
|
|
if ! grep -qFx "${author}" authors.txt; then
|
|
echo "ERROR: ${author} NOT FOUND"
|
|
echo "::warning ::New author found: ${author}"
|
|
echo "${author}" >> new-authors.txt
|
|
echo has_new_authors="yes" >> $GITHUB_ENV
|
|
fi
|
|
done < commit-authors.txt
|
|
- run: mkdir new-authors
|
|
- run: cp new-authors.txt new-authors
|
|
- run: echo ${{ github.event.number }} > new-authors/pr-number.txt
|
|
- run: ls -l
|
|
- name: Upload new authors
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
|
|
with:
|
|
name: new-authors
|
|
path: new-authors
|
|
|