Github Foundations · Free Practice Question Medium

Question 12

What are some of the reasons that a developer might choose to create a draft pull request in GitHub?

  • A

    to gather feedback from team members on proposed changes without the need for a formal review process

  • B

    to immediately trigger automated testing and integration processes

  • C

    to mark changes as complete, preventing any collaboration until the code is finalized

  • D

    draft pull requests are mandatory for large codebases and cannot be avoided

Reveal correct answer

Correct answer: A

Explanation

As a contributor, you want to be able to collaborate with your team members as soon as your code is ready to be reviewed. You may want to discuss the code with other team members, even if you plan on making changes to it later. But what if you don't want to submit the code for review just yet? Maybe the code is still a work in progress and you're not quite ready to merge it. Or maybe you just want to get the conversation started without actually submitting the code.

To help with this, you can use draft pull requests. This feature allows you to clearly indicate that your code is not yet ready for review. When you create a pull request, you can mark it as a draft instead of submitting it for review. This way, you can still start the conversation with your team members, while indicating that the code is not yet final.

********************
WRONG ANSWERS:

  • Draft pull requests do not immediately trigger automated testing and integration processes. They are a more informal stage for collaboration before the formal review process.

  • Draft pull requests are not mandatory for large codebases; they are optional and serve specific collaboration purposes.

  • Draft pull requests are not intended to mark changes as complete or prevent collaboration. They are designed to facilitate collaboration and discussion during the development process.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

A. Creating a draft pull request in GitHub allows developers to share their proposed changes with team members for feedback and discussion before initiating a formal review process. This can help in gathering early input and refining the changes based on initial feedback without affecting the main codebase.

B. Draft pull requests are not created to immediately trigger automated testing and integration processes. They are specifically used to mark changes as incomplete and gather feedback, rather than initiating automated processes.

C. Draft pull requests are used to mark changes as incomplete or a work in progress, rather than marking them as complete. This allows for collaboration and feedback before the code is finalized, rather than preventing collaboration until the code is fully ready.

D. Draft pull requests are not mandatory for large codebases; they are a feature in GitHub that developers can choose to use based on their workflow and collaboration needs. They are not a requirement for managing large codebases.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need