Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Tags to a Pull Request

People also ask

How do I tag a problem in a pull request?

Under your repository name, click Pull requests. In the list of pull requests, click the pull request that you'd like to link to an issue. In the right sidebar, in the "Development" section click . Click the issue you want to link to the pull request.

How do I add tags to GitHub?

In order to create a new tag, you have to use the “git tag” command and specify the tag name that you want to create. As an example, let's say that you want to create a new tag on the latest commit of your master branch. To achieve that, execute the “git tag” command and specify the tagname.

Can you add changes to a pull request?

The current way to update a pull request is to click on the “Edit” button along the other pull request action buttons. This will bring you to the update pull request page where you can make changes to the title, description, reviewers and specify whether to close the branch after the pull request has been merged.


How do I include the tag I've created into the Pull Request?

You can't. A pull request does not include tags. A pull request is only a pointer to a thread of commits (a branch) in your repository that you're proposing another repository to merge.

If you want to notify the upstream repository that a tag should be created, maybe should you add a comment to the pull request explaining this.


This is an old post but i fell on this while searching for something similar, i'll give you a more complete explanation.

Tags and branches in git are called references or "refs". You can move a ref anytime you want to a new commit and thus create loose commits if you move backwards in time. Even worst, those commits could be lost over time if pruned out because they are waiting in the void.

When you submit a PR, you actually ask someone to merge a list of commits in your repository referenced by your branch name (your ref) with a list of commits in a remote repository identified also by a ref (the base branch). If you have commits that are not present in your repository (you aren't up to date) and some of your commits actually touch places of code that you don't have on your side, then a merge needs to be done to resolve conflicts. If you aren't up to date but your code doesn't touch what has been modified since then, there won't be a conflict.

Finally, when stuff is getting merged into another repository, often, it will be squashed to save commit history creating a completely new commit hash and a new tree structure of commits.

Taken what i explained so far, that tags are just references just like branches. If you open a PR between two repositories' references that are branch references, then there is no way to create a tag because you are not creating any new refs in the end, you are just asking someone to take your commits into his code and move the base branches reference forward to the new commit after everything is merged in!

The best and only method really becomes to ask the maintainer to issue a release for his code by tagging if that's the way they do it but that is to their discretion!