Using github branch in code

Hello.
At work we're using PhpStorm and I've found one thing that would be amazing when working on Wordpress Plugins at least.

I have a plugin that updates github plugins by fetches the latest push from a github repo, and you're able to specify which branch.

I have one branch for wip and the usual master branch, and in the plugin I define the github repo and branch, and it would be really good if I was able to use some kind of tag in the code to be replaced with the name of the branch I'm pushing to.

Example:

/* Plugin Name: Example Plugin
* GitHub Plugin URI: http://github.com/exampleuser/examplerepo
* GitHub Branch: %BRANCH%
*/


When pushed to master it would turn into:

/* Plugin Name: Example Plugin
* GitHub Plugin URI: http://github.com/exampleuser/examplerepo
* GitHub Branch: master
*/


And when pushed to wip it would turn into:

/* Plugin Name: Example Plugin
* GitHub Plugin URI: http://github.com/exampleuser/examplerepo
* GitHub Branch: wip
*/


Is there anyway to achieve this, maybe through a plugin or anything. Pretty new to PhpStorm so if it does exist I must've missed it :p

Please sign in to leave a comment.