A repository uses GitHub Copilot coding agent to open draft pull requests from assigned issues. The team wants fast automated validation on every Copilot PR, but only deployment to the shared integration environment should pause for human approval. The environment named agent-integration already has required reviewers configured. Which option completes the workflow?
name: copilot-agent-control
on:
(Missing value 1):
types:
- opened
- synchronize
- ready_for_review
permissions:
contents: read
pull-requests: read
checks: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run agent PR validation
run: npm ci && npm test
integration-gate:
needs: validate
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
(Missing value 2): agent-integration
steps:
- name: Record approved integration check
(Missing value 3): echo "Human-reviewed integration gate passed"Choose an answer
Tap an option to check your answer.
Correct answer: Missing value 1 = pull_request Missing value 2 = environment Missing value 3 = run.
Why this is the answer
The correct option completes the GitHub Actions workflow to meet the requirements. Missing value 1 = pullrequest: The workflow should trigger on pull request events, specifically when a PR is opened, synchronized (new commits pushed), or marked ready for review. This ensures validation runs on every Copilot PR. push is incorrect because it triggers on pushes to branches, not PR-specific events. workflowdispatch is for manual triggers, and mergegroup is for merge queue events. Missing value 2 = environment: The agent-integration environment is where deployment should pause for human approval. Specifying environment: agent-integration for the integration-gate job correctly links it to this protected environment. concurrency manages job execution, permissions sets job-level permissions, and needs defines job dependencies. Missing value 3 = run: The run keyword executes shell commands. run: echo "Human-reviewed integration gate passed" is a placeholder for the actual deployment or approval recording step, demonstrating a command execution within the job. uses is for calling actions, with passes inputs to actions, and env sets environment variables.
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