In a commit that is part of a PR from outside repository, #xx references my issue, not theirs? #22267
-
Our organization’s repo has a PR from a forked repo. In that PR, commits like “yaddayadda, fixes #123” are pushed. Github now references our issue 123 in the commit, even though the committer meant to close an issue created in their fork. Who needs to fix this? Is this something that I can prevent as a repo owner accepting PRs or is this something on their end? If it makes any difference, their repo is not publicly visible, while ours is. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
In forks Issues are disabled by default because the idea is that people working in forks are generally working off of the parent repo’s issue list. So in the normal case, the #xx just works. If they manually enabled Issues on their fork, track them separately from the parent repository, but still merge back to the parent, they might want to use a fully-qualified issue link like As far as what you can do as a repo owner when someone puts an invalid “fixes #xxx” in their commit message, you have a few options:
If they put it in the body of the PR, then you can always edit it out before merging the PR. I hope that helps! Let us know if you have any other questions. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer. I think I now understand what happens. Is there any way we could get a warning in a PR when the origin and target repos both have issues enabled and the |
Beta Was this translation helpful? Give feedback.
-
I’ll pass along the feedback. I can’t promise when or even if it will be implemented, but I’ll let the appropriate team know. |
Beta Was this translation helpful? Give feedback.
I’ll pass along the feedback. I can’t promise when or even if it will be implemented, but I’ll let the appropriate team know.