A team uses an issue label named agent-approved to indicate that a Copilot agent plan has been reviewed. They want a workflow that can be triggered manually after the approval label is added. The workflow should not run automatically from every pull request or push. Which option completes the workflow?
name: approved-agent-execution
on:
(Missing value 1):
inputs:
issue_number:
description: Issue approved for agent execution
required: true
type: string
permissions:
contents: read
(Missing value 2): read
jobs:
verify-approval:
runs-on: ubuntu-latest
steps:
- name: Check approved issue label
env:
GH_TOKEN: ${{ github.token }}
ISSUE_NUMBER: ${{ inputs.issue_number }}
(Missing value 3): |
gh issue view "$ISSUE_NUMBER" \
--json labels \
--jq '.labels[].name' | grep -qx 'agent-approved'Choose an answer
Tap an option to check your answer.
Correct answer: Missing value 1 = workflow_dispatch Missing value 2 = issues Missing value 3 = run.
Why this is the answer
The correct option uses workflowdispatch for Missing value 1 because it allows for manual triggering of the workflow, which aligns with the requirement that the workflow should not run automatically on every pull request or push. pullrequest and push triggers would cause automatic execution, which is not desired. schedule triggers workflows at a predetermined time, not manually. For Missing value 2, issues: read is correct. The workflow needs to read issue labels to verify the agent-approved label, and the issues scope grants this permission. pull-requests, checks, and actions are incorrect as they do not provide the necessary permissions for reading issue data. Finally, run for Missing value 3 is correct because it executes the shell command provided, which checks for the presence of the agent-approved label on the specified issue. uses is for running actions defined by others, and with is for providing inputs to an action, neither of which is appropriate for executing a direct shell command.
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