Skip to content

Require explicit /evaluate for all PRs, add message to that effect - #363

Closed
danmoseley wants to merge 3 commits into
mainfrom
require-evaluate-command
Closed

Require explicit /evaluate for all PRs, add message to that effect#363
danmoseley wants to merge 3 commits into
mainfrom
require-evaluate-command

Conversation

@danmoseley

@danmoseley danmoseley commented Mar 14, 2026

Copy link
Copy Markdown
Contributor

Require an explicit /evaluate command for all PRs instead of auto-evaluating on every push. This significantly reduces token consumption by only running evaluation when a maintainer explicitly requests it. Note, on opening a PR, it will post a message educating/reminding about /evaluate.

Changes

evaluation.yml — now schedule-only:

  • Remove pull_request trigger entirely
  • Remove evaluation-status check job (no longer needed for PRs)
  • Simplify discover job to schedule-only code path

evaluation-fork-pr.yml — now handles all PRs (not just forks):

  • Remove fork-only filter so pull_request_target posts status for all PRs
  • Remove same-repo rejection in gate job so /evaluate works on upstream PRs too
  • Add one-time reminder comment when a PR is opened with skill/test/infra changes
  • Rename job and concurrency groups to reflect broader scope

How it works

  1. When any PR is opened/synchronized, pull_request_target runs discovery from the base branch and posts an evaluation-status commit status:
    • pending if the PR changes skills, tests, or evaluation infrastructure — prompts for /evaluate
    • success if no evaluatable changes are detected
  2. A maintainer posts /evaluate to trigger evaluation
  3. No evaluation runs automatically on push — for any PR, fork or upstream

Important note — CI will still be red if evaluation didn't run on the most recent commit. That does not change, so /evaluate must be requested on the final commit (at least). It will go green if evaluate ran and completed.

Remove the pull_request trigger from evaluation.yml so PRs no longer
auto-evaluate on every push. All PRs (fork and upstream) now require a
maintainer to post /evaluate to trigger evaluation.

Changes:
- evaluation.yml: schedule-only (remove pull_request trigger, remove
  evaluation-status check job, simplify discover to schedule path only)
- evaluation-fork-pr.yml: rename to handle all PRs, not just forks
  - Remove fork-only gate check
  - Post pending commit status for all PRs via pull_request_target
  - Post one-time /evaluate reminder comment when PR is opened with
    skill/test changes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 14, 2026 00:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the evaluation GitHub Actions workflows to stop auto-evaluating on PR pushes and instead require a maintainer-triggered /evaluate, while keeping scheduled evaluations for the canonical repo.

Changes:

  • Removed the pull_request trigger from evaluation.yml, leaving scheduled-only evaluation runs.
  • Shifted PR status posting + /evaluate gating to evaluation-fork-pr.yml for all PRs (not just forks).
  • Added an “open-time” reminder comment for PRs that change skills/tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
.github/workflows/evaluation.yml Makes evaluation scheduled-only; simplifies discovery and reusable workflow inputs.
.github/workflows/evaluation-fork-pr.yml Expands PR handling to all PRs: posts evaluation-status, gates evaluation behind /evaluate, and comments a one-time reminder on open for skill/test changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/evaluation.yml
Comment thread .github/workflows/evaluation-fork-pr.yml
Comment thread .github/workflows/evaluation-fork-pr.yml
Comment thread .github/workflows/evaluation.yml Outdated
Comment thread .github/workflows/evaluation-fork-pr.yml
Comment thread .github/workflows/evaluation-fork-pr.yml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Shifts evaluation to an explicit, maintainer-triggered /evaluate flow for pull requests, while keeping scheduled evaluations for the canonical repo to reduce automatic token usage on PR pushes.

Changes:

  • Removed pull_request triggering from evaluation.yml, leaving it schedule-only with simplified discovery and fixed parallelization settings.
  • Expanded evaluation-fork-pr.yml to handle all PRs via pull_request_target + issue_comment (/evaluate) gating.
  • Added a one-time reminder comment on PR open when skill/test changes are detected.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/evaluation.yml Removes PR execution path; keeps scheduled evaluation in dotnet/skills and simplifies discovery/matrix inputs.
.github/workflows/evaluation-fork-pr.yml Generalizes the PR evaluation gating/status workflow and adds reminder comment behavior.
Comments suppressed due to low confidence (1)

.github/workflows/evaluation-fork-pr.yml:54

  • This step uses actions/checkout@v6 (mutable tag) and also omits persist-credentials: false, while most workflows in this repo pin actions to a commit SHA and disable persisted git credentials. Please pin actions/checkout to a specific commit SHA (with a version comment) and consider setting persist-credentials: false for consistency and to reduce token exposure risk.
      - name: Checkout base branch
        uses: actions/checkout@v6
        with:
          ref: ${{ github.event.pull_request.base.sha }}
          fetch-depth: 0


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/evaluation-fork-pr.yml
- Remove pull-requests:write from schedule-only evaluation.yml (unused)
- Use stable concurrency group key for schedule runs
- Add explicit pull_request_target types (opened/synchronize/reopened)
- Pin checkout action to SHA with persist-credentials: false
- Expand detection to include infra paths (evaluation workflows, skill-validator)
- Update PR description to accurately describe pending vs success behavior

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@danmoseley
danmoseley requested a review from Copilot March 14, 2026 01:12
@danmoseley danmoseley changed the title Require explicit /evaluate for all PRs Require explicit /evaluate for all PRs, add message to that effect Mar 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the evaluation automation so PRs no longer auto-run evaluation on every push; instead maintainers must explicitly trigger it via /evaluate, while scheduled evaluations continue to run periodically on the canonical repo.

Changes:

  • Remove pull_request trigger and PR-specific logic/check job from evaluation.yml, making it schedule-only.
  • Expand evaluation-fork-pr.yml to handle status posting and /evaluate-triggered runs for all PRs (fork and upstream).
  • Add an “opened PR” reminder comment when evaluatable changes are detected.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/evaluation.yml Makes evaluation workflow schedule-only and simplifies discovery/evaluation inputs accordingly.
.github/workflows/evaluation-fork-pr.yml Uses pull_request_target to post evaluation-status for all PRs and gates actual evaluation behind /evaluate, with a one-time reminder comment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/evaluation-fork-pr.yml Outdated
Comment thread .github/workflows/evaluation-fork-pr.yml
When /evaluate is triggered on a PR with infrastructure changes
(evaluation workflows or eng/skill-validator/), evaluate all plugins
instead of only changed skills. This aligns the /evaluate discover
behavior with the initial status detection that marks infra PRs as
needing evaluation.

Also update the reminder comment text to mention infrastructure changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@danmoseley
danmoseley enabled auto-merge (squash) March 14, 2026 01:31

@ViktorHofer ViktorHofer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull_request_target or should only be used in forks. Otherwise we can never make changes to workflows or the skill-validator source code and respecting that in the run.

We also need to keep the evaluation-status job as that one is used in the rule settings and se as required for a PR.

I can help addressing the above points on Monday.

@danmoseley

Copy link
Copy Markdown
Contributor Author

I don't fully understand that so happy for you to fix on Monday as offered!

@ViktorHofer

Copy link
Copy Markdown
Member

Superseded by bd965cb

auto-merge was automatically disabled March 18, 2026 09:55

Pull request was closed

@ViktorHofer
ViktorHofer deleted the require-evaluate-command branch March 18, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants