Files
semantic-kernel/.github/workflows/github-automation-tests.yml
T
SergeyMenshykhandCopilot App c5868e5e3b Restrict DevFlow PR reviews to internal contributors (#14503)
### Motivation and Context

DevFlow currently starts PR reviews for all contributors. Align its
review eligibility with Microsoft Agent Framework by checking membership
in the internal developer team before running the review.

### Description

- Split the workflow into `prepare_pr`, `team_check`, and `review` jobs.
The review runs only when the team check succeeds.
- Check the **PR author** for automatic runs and the **person starting
the workflow** for manual runs. Draft PRs follow the same eligibility
check as other PRs.
- Add a team-membership helper that uses the team slug supplied by
`DEVELOPER_TEAM`, plus a `team-check` GitHub App token profile with
member and PR read permissions.
- Keep SK's existing spam/relevance check and DevFlow review steps.
- Add tests for the membership helper and token profile, and include the
helper in the automation test workflow's path filters.

---------

Co-authored-by: Copilot App <[email protected]>
2026-09-29 15:25:55 +01:00

40 lines
1.1 KiB
YAML

name: GitHub automation tests
on:
pull_request:
paths:
- ".github/actions/**"
- ".github/scripts/check_team_membership.js"
- ".github/tests/**"
- ".github/workflows/devflow-pr-review.yml"
- ".github/workflows/github-automation-tests.yml"
- ".github/workflows/label-issues.yml"
- ".github/workflows/label-pr.yml"
push:
branches:
- main
paths:
- ".github/actions/**"
- ".github/scripts/check_team_membership.js"
- ".github/tests/**"
- ".github/workflows/devflow-pr-review.yml"
- ".github/workflows/github-automation-tests.yml"
- ".github/workflows/label-issues.yml"
- ".github/workflows/label-pr.yml"
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
- name: Run JavaScript tests
run: node --test .github/tests/*.js