AZ-400 Question 230
Single answerYou are the DevOps lead for a team using a private repository in GitHub. A new developer needs to commit code, open and manage issues, and merge pull requests. However, you want to restrict them from modifying core repository settings, managing collaborators, or changing security policies. Which GitHub role should you assign to this new developer?
- A
Read
- B
Triage
- C
Write
- D
Admin
- E
Maintain
Show answer and explanation
Correct answer: C
Explanation
In GitHub, the Write role is the appropriate level of access for a developer who needs to push code, handle issues, and merge pull requests but should not modify repository-level settings or manage security/policy configurations. Refer to GitHub documentation (docs.github.com) on roles for details regarding each role's permissions.
- A. Incorrect.
Option 1 (Read) is incorrect. The Read role only allows viewing repository contents and cannot push code or manage issues.
- B. Incorrect.
Option 2 (Triage) is incorrect. The Triage role focuses on managing and triaging issues or pull requests, but it does not allow push or full write access to the codebase.
- C. Correct.
Option 3 (Write) is correct. The Write role permits a user to commit code, manage issues, and merge pull requests while preventing them from altering core repository settings.
- D. Incorrect.
Option 4 (Admin) is incorrect. The Admin role grants full administrative rights, including changing repository settings and managing access for other users, which exceeds the requirements.
- E. Incorrect.
Option 5 (Maintain) is incorrect. The Maintain role allows some repository administrative tasks, such as moving or renaming a repository, which is beyond what the new developer needs.