A Copilot coding agent is assigned issues labelled agent-task. The team wants the PR evaluation workflow to measure whether the generated code satisfies the intended feature behaviour. The workflow should run on Copilot PR updates, execute behaviour-focused tests, and only write the evaluation summary when the behaviour checks have passed. Which option completes the workflow?
name: agent-intent-evaluation
on:
(Missing value 1):
types:
- opened
- synchronize
- ready_for_review
permissions:
contents: read
pull-requests: read
jobs:
evaluate:
if: contains(github.event.pull_request.labels.*.name, 'agent-task')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Run intent-aligned tests
(Missing value 2): npm run test:acceptance
- name: Write evaluation summary
if: (Missing value 3)
run: echo "Acceptance criteria validated"Choose an answer
Tap an option to check your answer.
Correct answer: Missing value 1 = pull_request Missing value 2 = run Missing value 3 = success().
Why this is the answer
The correct answer is pullrequest for Missing value 1, run for Missing value 2, and success() for Missing value 3. pullrequest is correct because the workflow needs to trigger on pull request events (opened, synchronize, readyforreview) to evaluate Copilot PR updates. push is incorrect as it triggers on code pushes, not PR lifecycle events. issues and workflowdispatch are irrelevant to PR evaluation. run is correct for Missing value 2 because npm run test:acceptance is a shell command that executes tests. uses is for GitHub Actions, env sets environment variables, and with passes inputs to actions, none of which are appropriate here. success() is correct for Missing value 3 because the evaluation summary should only be written if the preceding Run intent-aligned tests step successfully passed, indicating the behavior checks were met. always() would write the summary regardless of test outcome, failure() would write it only on failure, and cancelled() would write it only if the step was cancelled, none of which align with the requirement.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed