Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next/605/70x/20241017/v1 #11982

Merged
merged 16 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/actions/install-cbindgen/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Install cbindgen
runs:
using: "composite"
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: cbindgen
path: prep
- name: Setup cbindgen
shell: bash
run: |
mkdir -p $HOME/.cargo/bin
cp prep/cbindgen $HOME/.cargo/bin
chmod 755 $HOME/.cargo/bin/cbindgen
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
7 changes: 3 additions & 4 deletions .github/workflows/authors-done.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- run: echo "Author check is complete"

- name: Download artifact new authors
uses: actions/github-script@v6
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
Expand All @@ -38,14 +38,13 @@ jobs:
fi
- name: Comment on PR
if: ${{ env.new_authors == 'yes' }}
uses: actions/github-script@v6
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
let fs = require('fs');
let issue_number = Number(fs.readFileSync('./pr-number.txt'));
let new_authors = String(fs.readFileSync('./new-authors.txt'));
let msg = 'NOTE: This PR may contain new authors:\n\n```\n' + new_authors + '```';
let msg = 'NOTE: This PR may contain new authors.';
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,33 @@ 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@v3
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- run: sudo apt -y install git
- name: Export known authors from master branch
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
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 -q "^${author}\$" authors.txt; then
if ! grep -qFx "${author}" authors.txt; then
echo "ERROR: ${author} NOT FOUND"
echo "::warning ::New author found: ${author}"
echo "${author}" >> new-authors.txt
Expand All @@ -35,7 +41,7 @@ jobs:
- run: echo ${{ github.event.number }} > new-authors/pr-number.txt
- run: ls -l
- name: Upload new authors
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: new-authors
path: new-authors
Expand Down
Loading
Loading