A repository requires every Copilot-generated pull request to include an agent-plan.json file before reviewers evaluate implementation changes. The file must contain the fields goal, scope, files_to_change, tests, and risks. The workflow should run on pull request activity and validate the plan without granting write permissions. Which option completes the workflow?
name: validate-agent-plan
on:
(Missing value 1):
types:
- opened
- synchronize
- ready_for_review
permissions:
contents: read
(Missing value 2): read
jobs:
validate-plan:
runs-on: ubuntu-latest
if: github.actor == 'github-copilot[bot]'
steps:
- uses: actions/checkout@v4
- name: Validate structured plan
(Missing value 3): |
test -f agent-plan.json
jq -e '
.goal and
.scope and
.files_to_change and
.tests and
.risks
' agent-plan.jsonChoose an answer
Tap an option to check your answer.
Correct answer: Missing value 1 = pull_request Missing value 2 = pull-requests Missing value 3 = run.
Why this is the answer
The correct option completes the workflow to validate the agent-plan.json file. Missing value 1 = pullrequest: The workflow needs to trigger on pull request activity, specifically when a PR is opened, synchronized (updated), or marked ready for review. pullrequest is the correct event for this. push triggers on code pushes, workflowdispatch allows manual triggering, and pullrequesttarget has different security implications and is not needed here. Missing value 2 = pull-requests: To read pull request metadata and files, the pull-requests: read permission is necessary. checks, issues, and actions are incorrect as they grant permissions for different GitHub features not directly related to reading PR content for validation in this context. Missing value 3 = run: The run keyword executes shell commands directly within the step, which is required to use test -f to check for file existence and jq -e to validate the JSON structure and required fields. uses is for executing pre-built actions.
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