Files
awesome-copilot/.github/workflows/contributors.yml
T
Aaron Powell 0eb6062f94 chore(phase2): retarget all automation and contributor guidance from staged to main (#2122)
* chore(phase2): retarget all automation from staged to main

- publish.yml: trigger on main, publish only to marketplace
- check-pr-target.yml: invert — now blocks PRs targeting staged, welcomes main
- 10 PR validation workflows: branches [staged] → [main]
- external-plugin-command-router.yml: --base staged → main (3×), message text
- external-plugin-rereview-command.yml: --base staged → main (2×), message text
- external-plugin-rereview.yml: staged reference in review comment text
- external-plugin-intake.yml: ref: staged checkout → main
- external-plugin-pr-quality-gates.yml: ref: staged checkout → main
- external-plugin-quality-gates.yml: ref: staged checkout → main
- check-plugin-structure.yml: error messages updated for new branch model
- contributors.yml: ref and base target → main
- setup-labels.yml: targets-main label description updated
- cli-for-beginners-sync.md + .lock.yml: base-branch staged → main
- codeowner-update.md + .lock.yml: base-branch staged → main
- learning-hub-updater.md + .lock.yml: base-branch staged → main

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs(phase2): update contributor guidance from staged to main

- CONTRIBUTING.md: branch from main, PR targets main; remove Phase 2 gate note
- AGENTS.md: PR target + external plugin PR automation references
- .github/pull_request_template.md: PR checklist targets main
- website/src/content/docs/learning-hub/agentic-workflows.md: PR target

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* aw updates

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-25 14:36:53 +10:00

87 lines
2.7 KiB
YAML

name: Contributors
on:
schedule:
- cron: '0 3 * * 0' # Weekly on Sundays at 3am UTC
workflow_dispatch: # Manual trigger
jobs:
contributors:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
ref: main
- 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@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: ${{ steps.node-version.outputs.version }}
- name: Install dependencies
run: npm ci
- name: Check contributors
id: contributors_check
run: npm run contributors:check
env:
PRIVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
- name: Generate contributors report
if: steps.contributors_check.outcome == 'failure'
run: |
mkdir -p reports
npm run contributors:report
test -f reports/contributor-report.md && cat reports/contributor-report.md >> "$GITHUB_STEP_SUMMARY"
env:
PRIVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
- name: Regenerate README
run: npm start
- name: Check for changes
id: verify-changed-files
run: |
if git diff --exit-code > /dev/null; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Commit contributors
if: steps.verify-changed-files.outputs.changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "docs: update contributors" -a || exit 0
- name: Create Pull Request
if: steps.verify-changed-files.outputs.changed == 'true'
uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: main
commit-message: "docs: update contributors"
title: "Update Contributors"
body: |
Auto-generated PR to update contributors.
This PR was automatically created by the contributors workflow.
branch: update-contributors
delete-branch: true