How to define the .deb-packages name to reflect the Git branch

Our team develops an application. As this application intended to run on Debian, we’ve done it in a proper Debian way – via .deb packages. This app is written in C++/Python and versioned using Git.

We have a private Debian repo where I place snapshot and release versions (approach taken from Java world):

  • appname-1.2-SNAPSHOT.deb
  • appname-1.2.1.deb

Now some of developers have branched, have writen code and finally are creating pull requests. By pull request I want to trigger the testing of his work – make sure it is not so bad to go to master branch. So I am creating the VM and.. what should I install from Debian repo before triggering the test? What is the best practice?