# How are Buildkite Build Creator Environment Variables Populated?

**URL:** <https://forum.buildkite.community/t/how-are-buildkite-build-creator-environment-variables-populated/1498>\
**Category:** General\
**Created:** [March 23, 2021, 12:21am UTC](https://forum.buildkite.community/t/how-are-buildkite-build-creator-environment-variables-populated/1498 "2021-03-23T00:21:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amukherjee](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@amukherjee](https://forum.buildkite.community/u/amukherjee)\
**Post date:** [March 23, 2021, 12:21am UTC](https://forum.buildkite.community/t/how-are-buildkite-build-creator-environment-variables-populated/1498/1 "2021-03-23T00:21:27Z")

</div>

Hi! Had a question about the environment variables as described on the [environment variables](https://buildkite.com/docs/pipelines/environment-variables) page

- BUILDKITE\_BUILD\_CREATOR
- BUILDKITE\_BUILD\_CREATOR\_EMAIL
- BUILDKITE\_BUILD\_CREATOR\_TEAMS

How specifically are these fields populated? Presumably if the user kicks off the build from the Buildkite UI itself, it’ll take that user and populated :allthethings:

In the flow of being triggered by the source control system via webhook, presumably it takes some metadata from the source control system. What specifically is that? For example, if the source control system is git, does the email as specified in the **author** of the commit get mapped to a Buildkite user, and from that the name and teams are discovered?

Similarly, in the flow of a build being triggered by one of our systems via the GraphQL API, how are these questions answered? Does it inherit permissions based on our user which is triggering the build via the API – I ask specifically since this doesn’t seem to be the case, as I’m seeing the actual author of the commit instead of our service user.

Thanks!

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/jason/32/742_2.png) [@Jason](https://forum.buildkite.community/u/Jason)\
**Post date:** [March 23, 2021, 8:07am UTC](https://forum.buildkite.community/t/how-are-buildkite-build-creator-environment-variables-populated/1498/2 "2021-03-23T08:07:05Z")

</div>

Hey @amukherjee,

Good question!

The general flow is that we look for the author first (commit author), otherwise, we look for the build creator and do our best to map that to a Buildkite User (and the associated teams if they are enabled and they exist).

The flow kinda looks like this:

​BUILDKITE\_BUILD\_CREATOR =\> We first look for a build author, otherwise, we look for the build creator.

​BUILDKITE\_BUILD\_CREATOR\_EMAIL =\> we use the BUILDKITE\_BUILD\_CREATOR value and look for the preferred email, otherwise, we look for the email in the build author and try and find the value there.

​BUILDKITE\_BUILD\_CREATOR\_TEAMS =\> we look for the associated teams for the build author, otherwise, we look for build creator.

So in both those cases you mention, I would expect that we would take the author first if it exists.
