Microsoft GH-200 Practice Test Questions and Exam Dumps Part13 Q241-260

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

 

Question 241

Which GitHub Actions property assigns a unique identifier to a step?

  1. id
  2. name
  3. uses
  4. shell

Correct Answer: 1

Explanation:

The id property gives a workflow step a unique identifier that can be referenced later within expressions. Step identifiers are especially useful when another step needs to access an output generated earlier in the same job. The name property provides a human-readable description, uses specifies an action to execute, and shell determines the command interpreter for a run step. Using meaningful step IDs makes workflows easier to connect internally because subsequent expressions can address the specific step without relying on its display name.

Question 242

Which GitHub Actions context exposes outputs from completed steps?

  1. runner
  2. steps
  3. matrix
  4. strategy

Correct Answer: 2

Explanation:

The steps context provides information about steps that have executed within the current job, including their outputs when those outputs are defined. A later step can reference an earlier step by its assigned ID and retrieve the required output. The runner context describes the execution environment, matrix contains the current matrix values, and strategy contains matrix strategy information. The steps context is therefore the appropriate mechanism for accessing values produced by earlier steps during the same job.

Question 243

Which GitHub feature automatically proposes dependency version upgrades?

  1. CodeQL
  2. Dependabot version updates
  3. Secret scanning
  4. Repository insights

Correct Answer: 2

Explanation:

Dependabot version updates can automatically create pull requests that update dependencies according to the configuration defined for the repository. This helps projects keep dependency versions current without requiring maintainers to manually identify every available upgrade. CodeQL analyzes source code for security issues, secret scanning detects exposed credentials, and repository insights provide activity and repository metrics. Dependabot version updates therefore focus specifically on keeping declared dependencies aligned with newer available versions.

Question 244

Which GitHub Actions keyword supplies parameters to an action?

  1. with
  2. needs
  3. env
  4. permissions

Correct Answer: 1

Explanation:

The with keyword supplies input parameters to an action. Actions can define supported inputs, allowing workflow authors to customize their behavior without modifying the action’s implementation. For example, an action may accept a version, configuration value, or path through with. The needs keyword establishes job dependencies, env defines environment variables, and permissions controls token access. Correctly supplying action inputs is essential when reusable actions require configuration specific to the workflow or repository.

Question 245

Which GitHub repository capability helps standardize how users submit new issues?

  1. Issue forms
  2. Release notes
  3. Branch rules
  4. Package versions

Correct Answer: 1

Explanation:

Issue forms allow maintainers to create structured templates for collecting information when users open issues. Forms can request specific fields, provide descriptions, and guide contributors toward supplying details needed for effective triage. Release notes summarize changes associated with versions, branch rules govern repository changes, and package versions identify published software artifacts. Issue forms are therefore particularly useful when a project needs consistent information for bug reports, feature requests, or support requests.

Question 246

Which GitHub Actions setting specifies how many days artifacts remain available?

  1. retention-days
  2. timeout-minutes
  3. max-parallel
  4. fetch-depth

Correct Answer: 1

Explanation:

The retention-days setting controls how long uploaded workflow artifacts are retained. Adjusting retention can help organizations balance accessibility against storage usage and repository policies. timeout-minutes limits how long a job can execute, max-parallel controls simultaneous matrix jobs, and fetch-depth determines the amount of Git history retrieved by checkout operations. Artifact retention is therefore separate from workflow execution duration and repository cloning behavior.

Question 247

Which GitHub feature lets maintainers review dependency changes introduced by a pull request?

  1. Dependency review
  2. GitHub Pages
  3. Repository topics
  4. Project milestones

Correct Answer: 1

Explanation:

Dependency review helps identify dependency changes introduced by a pull request and can highlight relevant security or licensing information depending on the repository configuration and supported capabilities. This allows maintainers to evaluate dependency modifications before merging them. GitHub Pages hosts static sites, repository topics categorize repositories, and project milestones organize work toward broader objectives. Dependency review therefore fits directly into the pull request review process when changes affect project dependencies.

Question 248

Which GitHub Actions feature can conditionally execute a step based on an expression?

  1. if
  2. name
  3. shell
  4. uses

Correct Answer: 1

Explanation:

The if condition controls whether a job or step should execute based on an expression. Workflow authors can use contexts, comparisons, status functions, and other supported expressions to create conditional automation. For example, a step might execute only for a particular branch, event type, or successful preceding operation. name provides descriptive text, shell selects the command interpreter, and uses invokes an action. Conditional execution through if allows workflows to adapt their behavior without duplicating complete jobs or workflows.

Question 249

Which GitHub feature provides automated analysis using CodeQL queries?

  1. Code scanning
  2. Discussions
  3. Projects
  4. Releases

Correct Answer: 1

Explanation:

GitHub code scanning can use CodeQL to analyze source code and identify patterns associated with potential security vulnerabilities. CodeQL represents source code in a form that can be queried for security-relevant patterns, allowing supported analyses to identify potential weaknesses. Discussions provide conversational spaces, Projects manage work, and Releases distribute versioned software. Code scanning is therefore the GitHub security capability associated with CodeQL-based source analysis.

Question 250

Which GitHub Actions setting determines the number of Git commits retrieved by checkout?

  1. fetch-depth
  2. path
  3. ref
  4. repository

Correct Answer: 1

Explanation:

The fetch-depth input for the checkout action determines how much Git history is retrieved. A shallow checkout can reduce download time and data transfer when workflows only need the latest revision. A larger or unrestricted history may be necessary for operations that compare older commits, calculate historical information, or inspect tags. The path input controls where repository content is placed, ref selects the revision to check out, and repository identifies the repository source. Fetch depth therefore controls the amount of Git history available to the workflow.

Question 251

Which GitHub capability lets users suggest edits directly within a pull request review?

  1. Suggested changes
  2. Issue templates
  3. Repository labels
  4. Release assets

Correct Answer: 1

Explanation:

Suggested changes allow reviewers to propose specific modifications to code directly from pull request review comments. Contributors can then apply those suggestions when repository permissions and workflow conditions allow. This provides a convenient way to communicate small corrections without requiring reviewers to manually describe every edit. Issue templates structure new issue submissions, repository labels categorize work, and release assets distribute files with releases. Suggested changes are therefore designed specifically for making precise review recommendations within pull requests.

Question 252

Which GitHub Actions context contains the name of the workflow currently running?

  1. github.workflow
  2. github.ref
  3. github.actor
  4. github.sha

Correct Answer: 1

Explanation:

The github.workflow property identifies the name of the workflow associated with the current run. This can be useful when scripts or notifications need to report which workflow produced a result. github.ref identifies the Git reference associated with the event, github.actor identifies the user or application that initiated the workflow, and github.sha identifies the commit associated with the run. These properties provide different pieces of workflow metadata, so selecting the correct context property is important when building dynamic automation.

Question 253

Which GitHub feature allows repository maintainers to publish security vulnerability information?

  1. Security advisories
  2. Project boards
  3. Issue forms
  4. Repository topics

Correct Answer: 1

Explanation:

GitHub security advisories provide a mechanism for documenting and communicating information about security vulnerabilities affecting software. Maintainers can use supported advisory capabilities to describe vulnerabilities, affected versions, and remediation information. Project boards organize work, issue forms structure issue submissions, and repository topics categorize repositories. Security advisories therefore serve a specialized security communication purpose rather than general project management or issue organization.

Question 254

Which GitHub Actions strategy setting controls whether other matrix jobs stop after one failure?

  1. fail-fast
  2. include
  3. exclude
  4. max-parallel

Correct Answer: 1

Explanation:

The fail-fast matrix strategy setting controls whether in-progress matrix jobs can be canceled when another matrix job fails. When enabled, GitHub can stop remaining or in-progress matrix executions according to the strategy behavior. include adds matrix combinations, exclude removes selected combinations, and max-parallel limits how many matrix jobs execute concurrently. The setting is therefore useful when teams need to decide whether a matrix should continue testing all combinations after an early failure.

Question 255

Which GitHub feature provides a searchable record of repository activity and statistics?

  1. Insights
  2. Wiki
  3. Milestone
  4. Codespace

Correct Answer: 1

Explanation:

GitHub repository Insights provides information about repository activity and various development statistics. Depending on repository configuration and available features, maintainers can use Insights to examine areas such as contribution activity, traffic, commits, and other project information. Wikis provide documentation, milestones organize work toward objectives, and Codespaces provide development environments. Insights is therefore intended for understanding repository activity rather than creating documentation, managing work items, or writing code in a hosted environment.

Question 256

Which GitHub Actions capability can prevent a workflow from accessing unnecessary token permissions?

  1. Least-privilege permissions
  2. Artifact compression
  3. Matrix expansion
  4. Runner scaling

Correct Answer: 1

Explanation:

Configuring workflow permissions according to the minimum required access helps reduce the capabilities available to the workflow’s authentication token. This least-privilege approach is useful because workflows may execute code from dependencies, scripts, or actions, and excessive token permissions can increase potential impact if something goes wrong. Artifact compression affects stored files, matrix expansion creates job combinations, and runner scaling concerns execution capacity. Restricting permissions is therefore a security control that limits what workflow automation can access or modify.

Question 257

Which GitHub feature can automatically generate release notes from merged changes?

  1. Generated release notes
  2. Repository archive
  3. Issue forms
  4. Branch aliases

Correct Answer: 1

Explanation:

GitHub can generate release notes based on repository activity and configured conventions. Generated release notes can summarize merged pull requests and other relevant changes, helping maintainers prepare release descriptions more efficiently. Repository archiving changes the repository’s active status, issue forms structure issue submissions, and branch aliases are not the mechanism for generating release documentation. Automated release-note generation can reduce manual effort while providing contributors and users with a clearer summary of what changed between versions.

Question 258

Which GitHub Actions capability allows workflow logs to be organized into collapsible sections?

  1. Log grouping
  2. Artifact retention
  3. Environment protection
  4. Branch filtering

Correct Answer: 1

Explanation:

Log grouping allows workflow output to be organized into expandable sections within the GitHub Actions log interface. This can make lengthy build or test output easier to navigate because related messages can be visually grouped. Artifact retention controls how long uploaded files remain available, environment protection governs deployment conditions, and branch filtering determines when workflows trigger. Log grouping is therefore a presentation and troubleshooting feature that improves readability of detailed workflow output.

Question 259

Which GitHub repository feature can prevent accidental deletion of important branches?

  1. Branch protection
  2. Repository topics
  3. Release assets
  4. Discussion categories

Correct Answer: 1

Explanation:

Branch protection provides controls around important branches and can help prevent unauthorized or unsafe modifications. Depending on the configured rules, protected branches can have restrictions related to updates, reviews, status checks, and other operations. Repository topics categorize projects, release assets store downloadable release files, and Discussion categories organize conversations. Branch protection is therefore the relevant repository governance mechanism for safeguarding important development branches.

Question 260

Which GitHub Actions capability lets a workflow invoke reusable automation stored in another repository?

  1. Reusable workflow call
  2. Job timeout
  3. Artifact download
  4. Runner label

Correct Answer: 1

Explanation:

A reusable workflow can be invoked from another workflow when the reusable workflow is configured to accept calls. This allows organizations to centralize common automation and reference it from multiple repositories or projects. Shared workflows can standardize processes such as testing, compliance checks, packaging, or deployment while reducing duplicated YAML. Job timeouts control execution duration, artifact downloads retrieve stored files, and runner labels influence runner selection. Reusable workflow invocation therefore supports centralized automation across repository boundaries.