GH-900 · Question #56
Your team uses GitHub to track both development progress and issue resolution. You are working on a bug fix and have created a pull request for it. Your tech lead reminds you to link the PR to the…
The correct answer is B. Use a keyword like fixes #45 or resolves #45 in the PR description or commentright C. Navigate to the "Development" section of the PR and manually link the issue from a. To ensure the pull request automatically closes the related issue upon merging, you can use a keyword like "fixes #45" or "resolves #45" in the PR description or comment, or manually link the issue through the "Development" section of the pull request. These methods properly…
Question
Your team uses GitHub to track both development progress and issue resolution. You are working on a bug fix and have created a pull request for it. Your tech lead reminds you to link the PR to the corresponding issue so it's automatically closed once the PR is merged. Which TWO valid methods can you use to link a pull request to an issue? (Choose two.)
Options
- AMention the issue number in the PR title (e.g., Bug fix for #45)
- BUse a keyword like fixes #45 or resolves #45 in the PR description or commentright
- CNavigate to the "Development" section of the PR and manually link the issue from a
- DTag the issue with a linked label in the issue discussion
How the community answered
(52 responses)- A8% (4)
- B79% (41)
- D13% (7)
Explanation
To ensure the pull request automatically closes the related issue upon merging, you can use a keyword like "fixes #45" or "resolves #45" in the PR description or comment, or manually link the issue through the "Development" section of the pull request. These methods properly associate the issue with the PR, making tracking and resolution seamless. Option B is CORRECT because using supported keywords like fixes, closes, or resolves, followed by the issue number in the PR description or comments, will automatically close the issue when the PR is merged. Option C is CORRECT because GitHub allows you to manually link up to ten issues by going to the pull request's "Development" section and selecting the issues to associate. https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull- request-to-an-issue
Topics
Community Discussion
No community discussion yet for this question.