A repository uses Copilot coding agent for issue remediation. The team wants each agent-created pull request to collect measurable test results, capture reviewer-facing evaluation notes, and publish both as a workflow artifact. Which option completes the workflow?
name: evaluate-agent-pr
on:
(Missing value 1):
branches:
- main
permissions:
contents: read
pull-requests: read
jobs:
evaluate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Collect quantitative signals
(Missing value 2): |
mkdir -p evaluation
npm ci
npm test -- --json --outputFile=evaluation/test-results.json
npm run coverage -- --json > evaluation/coverage.json
- name: Collect qualitative signals
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr view ${{ github.event.pull_request.number }} \
--json reviews,comments \
> evaluation/reviewer-signals.json
- name: Publish evaluation bundle
uses: (Missing value 3)
with:
name: agent-evaluation-${{ github.event.pull_request.number }}
path: evaluation/Choose an answer
Tap an option to check your answer.
Correct answer: Missing value 1 = pull_request Missing value 2 = run Missing value 3 = actions/upload-artifact@v4.
Why this is the answer
The correct option completes the workflow to evaluate agent-created pull requests. Missing value 1: pullrequest is the correct trigger because the workflow needs to run specifically when a pull request is opened or updated, which is when agent-created changes would be introduced for review. workflowdispatch is for manual triggers, push triggers on pushes to branches, and mergegroup triggers for merge queues, none of which directly address the pull request evaluation requirement. Missing value 2: run is the correct keyword for executing shell commands directly within a step. The provided code snippet contains shell commands (mkdir, npm ci, npm test, npm run coverage), making run the appropriate choice. uses is for calling pre-built actions. Missing value 3: actions/upload-artifact@v4 is the correct action to publish the collected evaluation data (test results, coverage, reviewer notes) as a workflow artifact. This makes the data accessible after the workflow completes. actions/cache@v4 is for caching dependencies, and actions/download-artifact@v4 is for downloading artifacts, not uploading them.
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