Evaluation shows that Copilot-generated pull requests often pass unit tests but break the packaging step. The packaging check must run for pull requests to main, and the same check must also run for merge queue entries because the branch protection rule requires it. Which option completes the workflow?
name: package-validation
on:
(Missing value 1):
branches:
- main
(Missing value 2):
permissions:
contents: read
jobs:
package:
name: package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pnpm install --frozen-lockfile
- (Missing value 3): Build distributable package
run: pnpm build:packageChoose an answer
Tap an option to check your answer.
Correct answer: Missing value 1 = pull_request Missing value 2 = merge_group Missing value 3 = name.
Why this is the answer
The problem states that the packaging check must run for pull requests to main and for merge queue entries. pullrequest triggers the workflow when a pull request is opened, synchronized, or reopened, covering the pull request requirement. mergegroup triggers the workflow when a pull request is added to a merge queue, satisfying the merge queue requirement. The name keyword is used to provide a human-readable description for a step in a job, which is a standard practice for clarity in GitHub Actions workflows. Incorrect options: push would trigger on pushes to main, not pull requests. workflowdispatch is for manual triggering. uses is for referencing an action, not a step name. pullrequesttarget has different security implications and is not explicitly requested. schedule is for time-based triggers. workflowdispatch is for manual triggering. env is for environment variables, not a step name.
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