Get the Changelist Id from an environment variable?

jay's Avatar


13 May, 2015 10:22 PM

I'd like to be able to embed the matching git changelist id into my build version & notification message.

I notice that you have it nicely exposed in the build UI. I looked to see if it might be exposed to the build script via an environment variable -- didn't see it.

It would also be great to have the URL back to the github commit page like you do in the UI. This would be awesome from a notification feature perspective.

Last (and complicated) question -- if I could get the changelist titles of all the changes since the last good build on this branch and pop those into a notification -- wow!

  1. 1 Posted by jay on 13 May, 2015 10:29 PM

    jay's Avatar

    Closely related -- is there an environment variable for the branch name too?

    Just noticed my whole complicated multipart script comes down to:

     * create an evironment variable for the branch name
     * only send email notifications for the test and production branches

  2. Support Staff 2 Posted by Feodor Fitsner on 13 May, 2015 10:37 PM

    Feodor Fitsner's Avatar

    You can find a list of built-in environment variables here:

    Regarding change titles - I think you can use AppVeyor REST API to query the list of builds:

  3. 3 Posted by jay on 13 May, 2015 11:04 PM

    jay's Avatar

    Cool, almost there. Can I make a notification conditional based on branch? Specifically, do you have a syntax like notification: on: branch: production?

  4. Support Staff 4 Posted by Feodor Fitsner on 14 May, 2015 01:14 AM

    Feodor Fitsner's Avatar

    If you do conditional builds then notification settings are already branch-specific, no?

  5. 5 Posted by jay on 14 May, 2015 05:08 PM

    jay's Avatar

    Well, I removed the conditional builds since it was causing me to duplicate the code. I'm to the point where notifications are the only thing I can't modify behavior on a branch by branch basis without using conditional builds.

    So my ask if you've added the ability to deploy conditionally based on branch, perhaps you could expose the same branching logic for notifications too?

    Alternatively, if I could leave all the identifical code unduplicated and then have a small conditional build section that only contained my notification logic, this is also a clean design.

  6. Support Staff 6 Posted by Feodor Fitsner on 14 May, 2015 05:12 PM

    Feodor Fitsner's Avatar

    Sure, why not. Feel free to submit a new issue here:

  7. 7 Posted by jay on 26 Aug, 2015 06:12 PM

    jay's Avatar

    Please close this. I submitted a GitHub issue back in may.

  8. jay closed this discussion on 26 Aug, 2015 06:13 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac