I've been trying to remember how to create a pull request for an issue, and working from the writeup at https://api.backdropcms.org/documentation/contribute-to-backdrop-core#pu.... It has this line:

  • Always cross-link the pull request and the matching issue.

What does that mean?

Also, further down, it says "If you've made a pull request that needs cleaning up, it's easy to solve this problem by deleting the pull request, fixing the commits locally, and then making a new pull request." Does "deleting the pull request" mean closing it? There doesn't seem to be a way to delete them on GitHub.

Thanks.

Accepted answer

Always cross-link the pull request and the matching issue

Backdrop's core issue queue (https://github.com/backdrop/backdrop-issues/issues) is in a separate repository from the code itself, and therefore the pull requests (https://github.com/backdrop/backdrop/pulls). So this simply means you should create an issue in the issue queue first, then create a PR. In the PR, paste a link to the issue it fixes, and then go back to the issue and paste a link to the new PR so people can check it out.

Does "deleting the pull request" mean closing it?

Yes. If you need to start afresh, close the PR, create a new one, then do the linking as described above.

Comments

BWPanda's picture

Always cross-link the pull request and the matching issue

Backdrop's core issue queue (https://github.com/backdrop/backdrop-issues/issues) is in a separate repository from the code itself, and therefore the pull requests (https://github.com/backdrop/backdrop/pulls). So this simply means you should create an issue in the issue queue first, then create a PR. In the PR, paste a link to the issue it fixes, and then go back to the issue and paste a link to the new PR so people can check it out.

Does "deleting the pull request" mean closing it?

Yes. If you need to start afresh, close the PR, create a new one, then do the linking as described above.

So for pull requests on contributed modules, which don't cross repositories like that, we only need to format the commit message like

Issue #nnn: Do the thing.

and that will be linked up. Yes?

Then use full links for any core Backdrop pull requests / issues.

Thanks.