Search code examples
templatesgithubbranchgit-branchpull-request

GitHub pull request template: get current branch name


I'm creating a pull request template for my repository.

I added a new file, following the instructions at https://help.github.com/articles/creating-a-pull-request-template-for-your-repository/ , and now I want its' body to contain a string generated using the current branch name (the pull request branch name).

Couldn't find the answer in GitHub's docs, would like to know if it's possible and if so how?


Solution

  • I tweeted the question: "is there a way to get the current branch name in a pull request template?"

    mentioning the GitHub account and this is the answer I was given:

    No, there currently isn't but if this is something you want included in all pull request submissions, you might want to check out Probot: https://probot.github.io . I recently created https://github.com/probot/view-rendered … that edits the pull request body to add rendered links for docs.

    Link to tweet: https://twitter.com/korndaniel1/status/1022468460226469888