Courseiva
Configure processes and communicationseasyMultiple ChoiceObjective-mapped

AZ-400 Configure processes and communications Practice Question

You want to ensure that every commit message in your repository follows a specific format. Which GitHub feature can enforce this?

⚠ Common exam trap

Candidates often confuse a GitHub Actions workflow that runs a commit lint action (which alone does not enforce anything) with the combination of that workflow and a required status check in branch protection rules, which is what actually enforces the commit message format.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Required status checks with a commit lint action

Required status checks, when combined with a commit lint action in a GitHub Actions workflow, can enforce commit message formatting. The workflow runs on push or pull request events, and the status check must pass before a pull request can be merged, effectively rejecting commits that do not conform to the specified format.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Webhooks to validate and reject pushes

    Why it's wrong here

    Webhooks are asynchronous HTTP callbacks that fire after an event occurs, so they cannot reject or block a push in real time—by the time the webhook is delivered, the commit has already been written to the repository. To enforce commit message rules, you need a synchronous pre-receive hook or a required status check.

  • Branch protection rules

    Why it's wrong here

    Branch protection rules can require pull request reviews, status checks, and linear history, but they have no built-in field for validating commit message format. They cannot inspect the commit message content directly; you must pair them with an external validation mechanism like a status check.

  • GitHub Actions workflow with push trigger

    Why it's wrong here

    A GitHub Actions workflow with a push trigger runs asynchronously after the commit has already been accepted into the repository, so it cannot reject or block the push itself. It can validate commit messages and create a check run, but without being configured as a required status check in branch protection rules, its failure has no enforcement effect. Even when designated as a required check, it blocks merging or later updates to the protected branch rather than acting as a synchronous pre-receive hook.

  • Required status checks with a commit lint action

    Why this is correct

    A required status check created by a commit lint action (e.g., a GitHub Actions workflow that runs on pull_request and push events) validates commit messages against a convention and reports a success/failure status. By marking that status check as required in branch protection rules, the push or merge is blocked until the commit messages pass the linting rule.

About these practice questions

This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.