GitHub-Foundations GitHub Foundations Exam Practice Test

Page: 1 / 14
Total 75 questions
Question 1

What is the minimum access needed to contribute to a repository?



Answer : D

To contribute to a GitHub repository, a user typically needs to be able to create branches, push changes, and open pull requests. These actions require Write access, which is the minimum level of access needed to contribute code directly to a repository.

Write Access:

Option D is correct because 'Write' access allows users to contribute to the repository by pushing changes, creating branches, and opening pull requests. This is the minimum required access level for contributing code.

Incorrect Options:

Option A (Read) is incorrect because 'Read' access only allows viewing the repository, not making changes.

Option B (Triage) is incorrect because while Triage access allows managing issues and pull requests, it does not allow pushing code.

Option C (Maintain) is incorrect because 'Maintain' access includes additional permissions beyond those needed for basic contributions, such as managing repository settings.


GitHub Docs: Repository Roles for an Organization

Question 2

Which of the following items can you customize for an individual Codespace?

(Each answer presents a complete solution. Choose three.)



Answer : A, C, D

When using GitHub Codespaces, you can customize several aspects of the development environment:

Shell: You can choose the default shell to be used in the Codespace, such as Bash, Zsh, or PowerShell.

Name: Users can customize the name of their Codespace for easier identification.

Default editor: You can choose which editor to use within the Codespace, such as Visual Studio Code or others that may be supported.

Branch protections and the operating system are not customizable for an individual Codespace within GitHub, making the options Shell, Name, and Default editor the correct answers.


Question 3

How can a user choose to receive ongoing updates about a specific activity on GitHub.com?



Answer : C

On GitHub, you can choose to receive ongoing updates about specific activities by subscribing to notifications for all activity in a repository. This allows you to stay informed about all changes, discussions, and updates related to a particular project. Additionally, GitHub provides the ability to customize notifications to suit your preferences.


Question 4

Where can you go to discover, browse, and install tools?



Answer : A

The GitHub Marketplace is the place where users can discover, browse, and install various tools and integrations that extend the functionality of GitHub. These tools can include CI/CD services, security checks, and other development utilities that enhance workflow automation and project management.


Question 5

Which of the following best describes GitHub Copilot?



Answer : C

GitHub Copilot is described as an AI pair programmer that offers autocomplete-style suggestions. It is a tool integrated into development environments like Visual Studio Code that helps developers by providing code suggestions as they type. Copilot can suggest entire lines or blocks of code based on the context of what you're writing, making it a valuable assistant in coding, but not a replacement for developers.


Question 6

From the Organization settings, which restrictions can organization owners place on GitHub Actions usage?

(Each answer presents a complete solution. Choose three.)



Answer : A, C, D

Organization owners on GitHub have control over how GitHub Actions can be used within their organization. They can enforce restrictions to ensure security and compliance with organizational policies.

Allow Actions That Use Self-Hosted Runners:

Option A is correct because organization owners can configure the usage of self-hosted runners, allowing greater control over the environment where actions are run.

Allow Specified Actions:

Option C is correct because organization owners can allow only specific actions to run, adding a layer of security by limiting actions to those that have been vetted.

Allow Actions by Marketplace Verified Creators:

Option D is correct because organization owners can choose to allow actions created by GitHub Marketplace verified creators, ensuring that only trusted actions are used.

Incorrect Options:

Option B is incorrect because GitHub Actions are not designed to be run directly from a Codespace; Codespaces are for development environments.

Option E is a valid choice, but since the prompt asks for only three answers, it is not included in this response.


GitHub Docs: Managing GitHub Actions Settings for Your Organization

Question 7

What does a CODEOWNERS file do in a repository?



Answer : D

The CODEOWNERS file in a GitHub repository is used to define individuals or teams that are responsible for specific parts of the codebase. When changes are made to files or directories that match the patterns specified in the CODEOWNERS file, GitHub automatically requests reviews from the listed code owners.

Setting Reviewers Automatically:

Option D is correct because the primary purpose of a CODEOWNERS file is to automatically set reviewers for pull requests that affect the specified files or directories. This ensures that the appropriate team members are notified and review the changes before they are merged.

Incorrect Options:

Option A is incorrect because the CODEOWNERS file does not restrict who can edit specific files; it only influences who is required to review changes.

Option B is partially related but not fully accurate because while CODEOWNERS does require certain reviews, it does not mandate peer review for all code changes.

Option C is incorrect because the CODEOWNERS file does not define access permissions for the repository; it deals with code review processes.


GitHub Docs: About CODEOWNERS

GitHub Blog: Automatically Requesting Reviews with CODEOWNERS

Page:    1 / 14   
Total 75 questions