tag:help.appveyor.com,2012-11-13:/discussions/questions/1270-get-the-changelist-id-from-an-environment-variableAppVeyor: Discussion 2018-10-19T08:17:12Ztag:help.appveyor.com,2012-11-13:Comment/368290132015-05-13T22:29:59Z2015-05-13T22:29:59ZGet the Changelist Id from an environment variable?<div><p>Closely related -- is there an environment variable for the
branch name too?</p>
<p>Just noticed my whole complicated multipart script comes down
to:</p>
<ul>
<li>create an evironment variable for the branch name</li>
<li>only send email notifications for the test and production
branches</li>
</ul></div>jaytag:help.appveyor.com,2012-11-13:Comment/368290132015-05-13T22:37:56Z2015-05-13T22:37:56ZGet the Changelist Id from an environment variable?<div><p>You can find a list of built-in environment variables here:
<a href="http://www.appveyor.com/docs/environment-variables">http://www.appveyor.com/docs/environment-variables</a></p>
<p>Regarding change titles - I think you can use AppVeyor REST API
to query the list of builds: <a href="http://www.appveyor.com/docs/api/projects-builds#get-project-history">
http://www.appveyor.com/docs/api/projects-builds#get-project-history</a></p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/368290132015-05-13T23:04:19Z2015-05-13T23:35:24ZGet the Changelist Id from an environment variable?<div><p>Cool, almost there. Can I make a notification conditional based
on branch? Specifically, do you have a syntax like notification:
on: branch: production?</p></div>jaytag:help.appveyor.com,2012-11-13:Comment/368290132015-05-14T01:14:10Z2015-05-14T01:14:10ZGet the Changelist Id from an environment variable?<div><p>If you do conditional builds then notification settings are
already branch-specific, no?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/368290132015-05-14T17:08:16Z2015-05-14T17:09:10ZGet the Changelist Id from an environment variable?<div><p>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.</p>
<p>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?</p>
<p>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.</p></div>jaytag:help.appveyor.com,2012-11-13:Comment/368290132015-05-14T17:12:10Z2015-05-14T17:12:10ZGet the Changelist Id from an environment variable?<div><p>Sure, why not. Feel free to submit a new issue here: <a href="https://github.com/appveyor/ci/issues">https://github.com/appveyor/ci/issues</a></p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/368290132015-08-26T18:12:04Z2015-08-26T18:12:31ZGet the Changelist Id from an environment variable?<div><p>Please close this. I submitted a GitHub issue back in may.</p></div>jay