Microsoft GH-200 Practice Test Questions and Exam Dumps Part10 Q181-200

View Full Microsoft GH-200 Exam Dumps and Practice Test Dumps

 

Question 181

Which GitHub feature provides a visual board for tracking work items?

  1. GitHub Projects
  2. GitHub Releases
  3. GitHub Pages
  4. GitHub Packages

Correct Answer: 1

Explanation:

GitHub Projects provides a flexible planning interface for organizing and tracking work. Teams can use project views to manage issues, pull requests, and other work items through tables, boards, or other supported layouts. This makes Projects useful for planning development tasks, monitoring progress, and coordinating work across repositories. Releases are intended for distributing versions of software, Pages provides website hosting, and Packages stores and distributes software packages. Projects therefore focuses on planning and work management rather than publishing or hosting artifacts.

Question 182

Which Git command creates a new local branch from the current commit?

  1. git restore
  2. git switch -c
  3. git stash
  4. git revert

Correct Answer: 2

Explanation:

The git switch -c command creates a new branch and switches the working directory to that branch. It is useful when starting development from the current commit without modifying the existing branch. git restore is primarily used to restore file contents, git stash temporarily stores uncommitted changes, and git revert creates a new commit that reverses the effects of an earlier commit. Understanding these commands helps developers manage branches and working changes safely while using Git repositories connected to GitHub.

Question 183

Which GitHub repository file defines how Dependabot groups dependency updates?

  1. .github/dependabot.yml
  2. .github/CODEOWNERS
  3. .github/ISSUE_TEMPLATE
  4. .github/PULL_REQUEST_TEMPLATE.md

Correct Answer: 1

Explanation:

The .github/dependabot.yml file contains Dependabot configuration for supported package ecosystems and update behavior. Its configuration can define update schedules, package directories, version-update behavior, and grouping rules. CODEOWNERS identifies responsible reviewers for specific repository paths. Issue templates guide users when creating issues, while pull request templates provide standardized content for pull request descriptions. Keeping Dependabot configuration in its expected location allows GitHub to recognize and apply the defined dependency-update settings automatically.

Question 184

Which GitHub capability automatically assigns reviewers based on repository file ownership?

  1. Milestones
  2. Labels
  3. CODEOWNERS
  4. Discussions

Correct Answer: 3

Explanation:

CODEOWNERS allows a repository to define individuals or teams responsible for specific files and directories. When configured correctly, GitHub can use those ownership rules to request reviews from the appropriate people when pull requests modify matching paths. This helps distribute review responsibilities according to project ownership. Milestones group issues and pull requests around goals or deadlines, labels categorize work items, and Discussions provide a conversational space. CODEOWNERS is therefore the repository feature specifically designed for path-based review responsibility.

Question 185

Which GitHub security feature identifies accidentally committed credentials?

  1. Dependency graph
  2. Secret scanning
  3. Repository insights
  4. Project views

Correct Answer: 2

Explanation:

Secret scanning helps detect credentials and other sensitive tokens that may have been committed to repositories. Depending on the configuration and supported secret types, GitHub can identify exposed credentials and provide alerts so maintainers can investigate and respond. The dependency graph focuses on software dependencies, repository insights provide repository activity and metrics, and project views support work management. Secret scanning is particularly important because credentials accidentally committed to source control can create significant security exposure if they remain active.

Question 186

Which GitHub Actions feature lets a job execute inside a specified Docker container?

  1. container
  2. permissions
  3. services
  4. defaults

Correct Answer: 1

Explanation:

The container keyword allows a GitHub Actions job to execute within a specified Docker container. This can provide a consistent execution environment with predefined operating-system packages, tools, and runtime dependencies. Containerized jobs are useful when builds or tests require a predictable environment that differs from the default runner configuration. The services keyword is used for supporting service containers, permissions controls token access, and defaults establishes default settings such as shell or working-directory behavior. The container property therefore directly controls the primary execution environment for a containerized job.

Question 187

Which GitHub API mechanism is commonly used to authenticate an application acting on behalf of a GitHub App installation?

  1. Repository password
  2. Installation access token
  3. Git commit hash
  4. Workflow artifact

Correct Answer: 2

Explanation:

A GitHub App can obtain an installation access token to authenticate API requests made on behalf of a particular installation. The token is scoped according to the permissions granted to that GitHub App installation and is generally more targeted than using broad personal credentials. A commit hash identifies a Git object rather than authenticating an API request. Workflow artifacts are generated files, and repository passwords are not the standard mechanism for GitHub App API authentication. Installation access tokens therefore provide application-specific authorization for interacting with resources available to the installation.

Question 188

Which GitHub Actions setting controls the maximum execution time of a job?

  1. continue-on-error
  2. fail-fast
  3. timeout-minutes
  4. max-parallel

Correct Answer: 3

Explanation:

The timeout-minutes setting establishes the maximum number of minutes a GitHub Actions job may run before GitHub terminates it. This helps prevent jobs from consuming runner resources indefinitely because of stalled commands or unexpected conditions. continue-on-error controls whether certain failures are tolerated, fail-fast affects matrix behavior when a matrix job fails, and max-parallel limits concurrent matrix executions. Setting an appropriate timeout can improve workflow reliability and resource management, especially for jobs that interact with external services or execute potentially long-running operations.

Question 189

Which GitHub repository setting controls who can directly push to a protected branch?

  1. Branch protection configuration
  2. Issue label settings
  3. Release metadata
  4. Discussion categories

Correct Answer: 1

Explanation:

Branch protection configuration can restrict direct pushes to protected branches and enforce additional requirements before changes are integrated. Depending on the configured rules, repositories can require pull requests, reviews, status checks, or other controls. These protections are commonly applied to important branches where uncontrolled direct changes could disrupt development or deployment processes. Issue labels organize work items, release metadata describes published versions, and Discussion categories organize conversational content. Branch protection is therefore the relevant mechanism for controlling direct modification of protected branches.

Question 190

Which GitHub Actions component is designed to run database services alongside a job?

  1. Matrix dimensions
  2. Service containers
  3. Repository variables
  4. Workflow inputs

Correct Answer: 2

Explanation:

Service containers provide additional containerized services that a GitHub Actions job can interact with during execution. Common examples include databases, caches, or other supporting services required by integration tests. The primary job container or runner executes the workflow steps, while service containers provide auxiliary processes accessible during the job. Matrix dimensions create multiple job variations, repository variables provide configuration values, and workflow inputs supply values to manually triggered or reusable workflows. Service containers are particularly useful for automated integration testing that requires temporary infrastructure.

Question 191

Which GitHub command-line command displays information about the current repository?

  1. gh repo view
  2. gh issue close
  3. gh release delete
  4. gh workflow disable

Correct Answer: 1

Explanation:

The gh repo view command displays information about a GitHub repository through the GitHub CLI. It can be used to inspect repository details without navigating through the web interface. Other GitHub CLI commands target different operations: gh issue close closes an issue, gh release delete removes a release, and gh workflow disable disables a workflow. The GitHub CLI provides command-line access to many GitHub operations, making it useful for automation and developers who prefer terminal-based repository management.

Question 192

Which GitHub Actions feature allows commands to modify workflow behavior through special output syntax?

  1. Git attributes
  2. Workflow commands
  3. Repository topics
  4. Git notes

Correct Answer: 2

Explanation:

GitHub Actions workflow commands allow steps to communicate special instructions to the runner through supported command syntax written to standard output. They can be used for tasks such as setting environment variables, creating annotations, grouping log output, or managing other workflow-related behavior. Git attributes control repository-specific Git behavior, repository topics help categorize repositories, and Git notes attach additional information to Git objects. Workflow commands are therefore specifically designed for communication between executing steps and the GitHub Actions runner.

Question 193

Which GitHub Actions action is commonly used to download repository contents onto a runner?

  1. actions/upload-artifact
  2. actions/cache
  3. actions/checkout
  4. actions/github-script

Correct Answer: 3

Explanation:

The actions/checkout action retrieves repository content and makes it available in the workflow’s workspace. It is commonly placed near the beginning of build, test, and analysis jobs because subsequent commands often need access to source files. actions/upload-artifact stores generated files, actions/cache manages reusable cached data, and actions/github-script enables JavaScript-based interaction with GitHub APIs. Checking out repository content is therefore a separate task from artifact storage, caching, or API automation.

Question 194

Which GitHub feature lets maintainers define standardized pull request description content?

  1. Pull request template
  2. Repository environment
  3. Deployment rule
  4. Security advisory

Correct Answer: 1

Explanation:

A pull request template provides predefined content that appears when contributors create a new pull request. Teams can use templates to request information such as testing details, implementation summaries, issue references, or deployment considerations. This encourages consistent pull request descriptions and can make reviews easier to organize. Repository environments manage deployment-related settings, deployment rules control environment access or protection, and security advisories communicate vulnerability information. Pull request templates therefore focus specifically on standardizing the information supplied with new pull requests.

Question 195

Which GitHub Actions expression function checks whether a string contains another value?

  1. join()
  2. contains()
  3. hashFiles()
  4. fromJSON()

Correct Answer: 2

Explanation:

The contains() expression function tests whether a specified value contains another value. It can be useful in workflow conditions when execution should depend on text or collection contents. For example, a workflow may use it to check whether a branch name, event-related value, or other expression result contains a particular string. join() combines array values, hashFiles() calculates a hash from matching files, and fromJSON() converts JSON-formatted data into an expression object. Choosing the correct expression function allows workflows to implement precise conditional behavior.

Question 196

Which GitHub feature publishes a static website directly from repository content?

  1. GitHub Codespaces
  2. GitHub Actions
  3. GitHub Pages
  4. GitHub Discussions

Correct Answer: 3

Explanation:

GitHub Pages provides hosting for static websites using content from GitHub repositories. It can be used for project documentation, personal sites, organizational pages, and other static web content. Depending on the configuration, a site can be published from a selected branch or through an automated deployment workflow. Codespaces provides cloud-based development environments, Actions automates repository workflows, and Discussions supports community conversations. GitHub Pages is therefore the GitHub capability specifically designed to publish static web content.

Question 197

Which GitHub Actions setting limits how many matrix jobs can run concurrently?

  1. max-parallel
  2. timeout-minutes
  3. working-directory
  4. continue-on-error

Correct Answer: 1

Explanation:

The max-parallel matrix setting limits the number of matrix jobs that can execute simultaneously. This can help control runner consumption and avoid placing excessive load on external services used during testing. A matrix may generate many job combinations, but limiting parallel execution allows workflow authors to balance speed against available resources. timeout-minutes controls job duration, working-directory changes the directory used by commands, and continue-on-error changes failure handling. Therefore, max-parallel is the setting directly associated with controlling concurrent matrix execution.

Question 198

Which GitHub security feature analyzes source code for potential vulnerabilities?

  1. Dependabot version updates
  2. Code scanning
  3. Repository archiving
  4. GitHub Pages

Correct Answer: 2

Explanation:

Code scanning analyzes repository source code to identify potential security vulnerabilities and coding problems. GitHub code scanning can use CodeQL and other supported analysis approaches to examine code and generate alerts that maintainers can investigate. Dependabot version updates focus on updating dependencies, repository archiving makes a repository read-only for ongoing development purposes, and GitHub Pages hosts static websites. Code scanning therefore addresses vulnerabilities in source code itself, complementing dependency and secret security capabilities.

Question 199

Which GitHub Actions feature permits a workflow to receive parameters from its caller?

  1. Artifact metadata
  2. Runner labels
  3. Workflow inputs
  4. Commit signatures

Correct Answer: 3

Explanation:

Workflow inputs allow reusable workflows or manually triggered workflows to receive defined parameter values. A reusable workflow can declare input names, types, and other supported properties, allowing calling workflows to supply configuration without duplicating workflow logic. This makes reusable automation more flexible because the same workflow can operate with different parameters. Artifact metadata describes stored workflow files, runner labels influence runner selection, and commit signatures provide information about commit authenticity. Workflow inputs therefore provide a structured way to pass caller-supplied values into workflow execution.

Question 200

Which GitHub feature provides a registry for storing container images and other packages?

  1. GitHub Packages
  2. GitHub Projects
  3. GitHub Issues
  4. GitHub Wiki

Correct Answer: 1

Explanation:

GitHub Packages provides package hosting and distribution capabilities integrated with GitHub. It supports package formats including container images and can connect package management with repositories, workflows, and access controls. This makes it useful for storing artifacts that need to be consumed by development or deployment processes. GitHub Projects focuses on work planning, Issues tracks tasks and problems, and Wiki provides repository documentation. GitHub Packages is therefore the GitHub service specifically intended for hosting and managing software packages and container images.