Skip to Content

GitHub Foundations: What is Not Best Practice for Cross-Linking GitHub Issues and Pull Requests?

Learn the best practices for cross-linking GitHub issues and pull requests to effectively track and resolve bugs. Discover what not to do when the root cause is known.

Table of Contents

Question

Suppose a bug issue is reported on your project, and you know which pull request introduced the problem. Which of the following options is not a cross-linking best practice?

A. Do not create cross-links when the root cause of the issue is already known.
B. Add a comment to the bug report that includes the pull request’s author by using an @mention.
C. Add a comment to the bug report that links the pull request to it using the #ID syntax.

Answer

A. Do not create cross-links when the root cause of the issue is already known.

Explanation

It’s a good practice to always add cross-links in case you or someone else needs the context later on.

When a bug is reported on your GitHub project and you’ve identified the pull request that introduced the issue, it’s important to follow cross-linking best practices to ensure effective communication and timely resolution.

The correct answer is:
A. Do not create cross-links when the root cause of the issue is already known.

Even if you know the root cause of the bug, it’s still considered a best practice to create cross-links between the bug report issue and the problematic pull request. Cross-linking helps provide valuable context, improves transparency, and makes it easier for others to understand the connection between the bug and the code changes that caused it.

Best practices for cross-linking in this situation include:

B. Add a comment to the bug report that includes the pull request’s author by using an @mention. This notifies the author and brings their attention to the issue.

C. Add a comment to the bug report that links the pull request to it using the #ID syntax, where ID is the pull request number. This creates a clickable link, making it simple to navigate between the issue and pull request.

By implementing these cross-linking techniques, you enhance collaboration, streamline the debugging process, and promote a more efficient workflow on GitHub.

GitHub Foundations certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the GitHub Foundations exam and earn GitHub Foundations certification.