A repository uses GitHub Copilot coding agent to implement issue assignments. The team wants every Copilot-created pull request to publish an inspection bundle containing the agent plan, test output, and diff summary as a GitHub Actions artifact. Which option completes the workflow?
name: agent-observability
on:
(Missing value 1):
branches:
- main
permissions:
contents: read
pull-requests: read
jobs:
capture-agent-output:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build inspection bundle
run: |
mkdir -p agent-inspection
cp .github/agent-plan.md agent-inspection/plan.md
npm test -- --json --outputFile=agent-inspection/test-results.json
git diff --stat origin/main...HEAD > agent-inspection/diffstat.txt
- name: Publish inspection bundle
uses: (Missing value 2)
with:
name: agent-inspection-${{ github.event.pull_request.number }}
path: (Missing value 3)Choose an answer
Tap an option to check your answer.
Correct answer: Missing value 1 = pull_request Missing value 2 = actions/upload-artifact@v4 Missing value 3 = agent-inspection/.
Why this is the answer
The correct answer ensures the workflow triggers on pull request creation or update, uploads the generated inspection bundle, and specifies the correct path for the artifact. Missing value 1 = pullrequest: The requirement is to publish an inspection bundle for every Copilot-created pull request. The pullrequest event trigger is specifically designed for actions related to pull request lifecycle events, making it the appropriate choice. push would trigger on every commit to main, not just PRs. workflowdispatch requires manual triggering. mergegroup is for merge queue events, not general PR creation. Missing value 2 = actions/upload-artifact@v4: The goal is to "publish an inspection bundle ... as a GitHub Actions artifact." The upload-artifact action is the standard GitHub Action for this purpose. download-artifact retrieves artifacts, and cache stores files for reuse between workflow runs, neither of which fulfills the publishing requirement. Missing value 3 = agent-inspection/: The Build inspection bundle step creates a directory named agent-inspection and places all relevant files inside it. To upload this entire bundle as an artifact, the path parameter of the upload-artifact action must point to this directory. .github/ is incorrect as the files are not stored there.
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