mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-20 02:15:12 +00:00
feat(eng): add contributor reporting and management scripts
- Add eng/README.md documenting maintainer utilities - Add eng/contributor-report.mjs for generating contributor reports - Add eng/add-missing-contributors.mjs for automating contributor additions - Add eng/utils/graceful-shutdown.mjs for script lifecycle management - Update eng/update-readme.mjs with minor fixes - Update package.json with new contributor scripts Generated-by: GitHub Copilot <copilot@github.com> Signed-off-by: Ashley Childress <6563688+anchildress1@users.noreply.github.com>
This commit is contained in:
40
.github/workflows/contributors.yml
vendored
40
.github/workflows/contributors.yml
vendored
@@ -8,32 +8,52 @@ on:
|
||||
jobs:
|
||||
contributors:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 12
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 0 # Required: add-missing-contributors.js needs full git history
|
||||
|
||||
- name: Extract Node version from package.json
|
||||
id: node-version
|
||||
run: |
|
||||
NODE_VERSION=$(jq -r '.engines.node // "22.x"' package.json)
|
||||
echo "version=${NODE_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: "20"
|
||||
node-version: ${{ steps.node-version.outputs.version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
run: npm ci
|
||||
|
||||
- name: Update contributors
|
||||
run: npm run contributors:check
|
||||
- name: Check and report contributors
|
||||
run: |
|
||||
CHECK_OUTPUT=$(npm run contributors:check 2>&1)
|
||||
echo "$CHECK_OUTPUT"
|
||||
|
||||
if echo "$CHECK_OUTPUT" | grep -q "Missing contributors"; then
|
||||
echo "Missing contributors detected, generating report..."
|
||||
mkdir -p reports
|
||||
npm run contributors:report
|
||||
|
||||
if [ -f reports/contributor-report.md ]; then
|
||||
cat reports/contributor-report.md >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
else
|
||||
echo "No missing contributors found"
|
||||
fi
|
||||
env:
|
||||
PRIVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
continue-on-error: true
|
||||
|
||||
- name: Regenerate README
|
||||
run: |
|
||||
npm install
|
||||
npm start
|
||||
run: npm start
|
||||
|
||||
- name: Check for changes
|
||||
id: verify-changed-files
|
||||
|
||||
Reference in New Issue
Block a user