A repository owner wants an agent to run only when a maintainer manually starts a GitHub Actions workflow. The workflow must accept an issue number, read issue context, create a branch with proposed changes, and open a draft pull request. Which option completes the workflow?
name: invoke-agent
on:
(Missing value 1):
inputs:
issue_number:
description: Issue number for the agent task
required: true
type: string
run_mode:
description: plan or implement
required: true
type: choice
options:
- plan
- implement
permissions:
contents: write
(Missing value 2): read
pull-requests: write
jobs:
agent:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Invoke repository agent
env:
GH_TOKEN: ${{ github.token }}
ISSUE_NUMBER: ${{ inputs.issue_number }}
RUN_MODE: ${{ inputs.run_mode }}
(Missing value 3): |
./scripts/repo-agent \
--issue "$ISSUE_NUMBER" \
--mode "$RUN_MODE" \
--draft-prChoose 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 workflowdispatch event (Missing value 1) allows a workflow to be manually triggered from the GitHub UI, API, or GitHub CLI, which aligns with the requirement for a maintainer to manually start the workflow. The issues: read permission (Missing value 2) is necessary for the agent to read the context of the specified issue. The run keyword (Missing value 3) executes shell commands, which is appropriate for invoking the ./scripts/repo-agent script. Incorrect options: pullrequest (Missing value 1) triggers on pull request activity, not manual dispatch. checks: read (Missing value 2) is not the primary permission needed for reading issue context. uses (Missing value 3) is for running actions, not shell commands. push (Missing value 1) triggers on code pushes, not manual dispatch. actions: read (Missing value 2) is not the primary permission for reading issue context. pullrequesttarget (Missing value 1) triggers on pull request activity, not manual dispatch, and has different security implications. deployments: read (Missing value 2) is irrelevant to reading issue context.
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