Courseiva
Design and implement a source control strategymediumMultiple ChoiceObjective-mapped

AZ-400 Practice Question: Design and implement a source control strategy

Your team uses GitHub and wants to automatically close stale branches that have not been updated in 90 days. Which GitHub feature should you configure?

⚠ Common exam trap

Candidates often confuse the Stale bot (which handles issues/PRs) with branch management, assuming it can also delete branches, but it has no branch deletion capability.

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

Create a scheduled GitHub Actions workflow that deletes branches older than 90 days

A is correct because GitHub Actions can be scheduled using cron syntax to run a workflow that identifies branches with no commits in the last 90 days and deletes them via the GitHub API. This gives you full control over the deletion logic, logging, and notifications, unlike a simple bot. The workflow can use actions like `actions/github-script` to enumerate branches and filter by `committer.date`.

Answer analysis

Option-by-option breakdown

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

  • Create a scheduled GitHub Actions workflow that deletes branches older than 90 days

    Why this is correct

    A scheduled GitHub Actions workflow using the `schedule` event (cron) can run `git branch -d` commands or call the GitHub API to list branches filtered by `committer.date` older than 90 days, then delete them, automating branch cleanup at the repository level.

  • Auto-merge feature

    Why it's wrong here

    Auto-merge is a GitHub feature that automatically merges a pull request when all required checks pass and approvals are satisfied; it does not inspect or delete branches, so it cannot address stale branches older than 90 days.

  • Stale bot (GitHub Actions)

    Why it's wrong here

    Stale bot (e.g., `actions/stale`) is designed to mark and close stale issues and pull requests after a period of inactivity, but it never operates on git branches, making it ineffective for deleting old branches.

  • GitHub Discussions

    Why it's wrong here

    GitHub Discussions is a collaborative space for community Q&A and conversations, not a branch management tool; it provides no mechanism to list or delete git branches, so it is irrelevant to the stale branch requirement.

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.