A team wants every Copilot-generated pull request to produce a drift report. The workflow should run on pull requests to main, read repository contents, run a script that compares the PR files against the issue scope, and persist the report as a workflow artifact for reviewers. Which option completes the workflow?
name: agent-drift-report
on:
(Missing value 1):
branches:
- main
permissions:
contents: (Missing value 2)
pull-requests: read
issues: read
jobs:
drift-report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate drift report
run: |
mkdir -p reports
node scripts/check-agent-drift.js > reports/drift-report.md
- name: Persist drift report
uses: (Missing value 3)
with:
name: agent-drift-report
path: reports/drift-report.mdChoose an answer
Tap an option to check your answer.
Correct answer: Missing value 1 = pull_request Missing value 2 = read Missing value 3 = actions/upload-artifact@v4.
Why this is the answer
The correct option is pullrequest for Missing value 1 because the requirement specifies the workflow should run on pull requests. read for Missing value 2 is correct because the workflow only needs to read repository contents and pull request information, not modify them. actions/upload-artifact@v4 for Missing value 3 is the correct action to persist the generated report as a workflow artifact, making it available for download by reviewers. Incorrect options: push would trigger on every push, not specifically pull requests. write permissions are unnecessary. actions/cache@v4 is for caching files between workflow runs, not for persisting artifacts for review. workflowdispatch requires manual triggering. actions/download-artifact@v4 is for downloading artifacts, not uploading them. schedule triggers at scheduled times, not on pull requests. none permissions would prevent reading repository contents. actions/upload-pages-artifact@v3 is for GitHub Pages deployments, not general artifact storage.
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