> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/open-source/use-harness-open-source/pipelines-1/reference/expression-variables.md).

# Expression Variables

Index of variables that can be referenced in pipelines with the expression syntax `${{ variable.name }}`.

## build.action

Provides the action that triggered the pipeline execution. Use this value to differentiate between the pull request being created, reopened, when a branch is created, etc.

| **Action**            | **Value**                |
| --------------------- | ------------------------ |
| Manual Run            |                          |
| Branch Created        | `branch_created`         |
| Branch Updated        | `branch_updated`         |
| Pull Request Created  | `pullreq_created`        |
| Pull Request Updated  | `pullreq_branch_updated` |
| Pull Request Reopened | `pullreq_reopened`       |
| Pull Request Closed   | `pullreq_closed`         |
| Tag Created           | `tag_created`            |
| Tag Updated           | `tag_updated`            |

## build.after

Provides the git commit sha after the patch is applied.

| **Action** | **Example value**                          |
| ---------- | ------------------------------------------ |
| All        | `bcdd4bf0245c82c060407b3b24b9b87301d15ac1` |

## build.author\_email

Provides the commit email address for the current running build. *Note this is a user-defined value and may be empty or inaccurate.*

| **Action** | **Example value**     |
| ---------- | --------------------- |
| All        | `janedoe@example.com` |

## build.author\_login

Provides the commit author username for the current running build.

| **Action** | **Example value** |
| ---------- | ----------------- |
| All        | `janedoe`         |

## build.author\_name

Provides the commit author name for the current running build. *Note this is a user-defined value and may be empty or inaccurate.*

| **Action** | **Example value** |
| ---------- | ----------------- |
| All        | `Jane Doe`        |

## build.before

Provides the git commit sha before the patch is applied.

| **Action** | **Example value**                          |
| ---------- | ------------------------------------------ |
| All        | `bcdd4bf0245c82c060407b3b24b9b87301d15ac1` |

## build.branch

Provides the target branch for the push or pull request.

| **Action** | **Example values**        |
| ---------- | ------------------------- |
| All        | `main`, `feature/develop` |

## build.commit

Provides the git commit sha for the current running build.

| **Action** | **Example value**                          |
| ---------- | ------------------------------------------ |
| All        | `bcdd4bf0245c82c060407b3b24b9b87301d15ac1` |

## build.event

Provides the event that triggered the pipeline execution.

| **Action**                              | **Value**      |
| --------------------------------------- | -------------- |
| Manual Run                              | `manual`       |
| Branch Created, Updated                 | `push`         |
| Pull Request Created, Updated, Reopened | `pull_request` |
| Tag Created, Updated                    | `tag`          |

## build.link

Provides a deep link the build results.

| **Action** | **Example value**                                    |
| ---------- | ---------------------------------------------------- |
| All        | `https://gitness.company.com/example/hello-world/42` |

## build.message

Provides the commit message or pull request title for the current running build.

| **Action**                              | **Value**          |
| --------------------------------------- | ------------------ |
| Manual Run                              | Commit message     |
| Branch Created, Updated                 | Commit message     |
| Pull Request Created, Updated, Reopened | Pull request title |
| Tag Created, Updated                    | Commit message     |

## build.number

Provides the build number for the current running build.

| **Action** | **Example value** |
| ---------- | ----------------- |
| All        | `42`              |

## build.ref

Provides the git reference for the current running build.

| **Action**                              | **Example values**                              |
| --------------------------------------- | ----------------------------------------------- |
| Manual Run                              | `refs/heads/main`, `refs/heads/feature/develop` |
| Branch Created, Updated                 | `refs/heads/main`, `refs/heads/feature/develop` |
| Pull Request Created, Updated, Reopened | `refs/heads/feature/develop`                    |
| Tag Created, Updated                    | `refs/tags/v1.2.3`                              |

## build.sender

Provides the username for who initiated a manual build.

| **Action**                              | **Example values** |
| --------------------------------------- | ------------------ |
| Manual Run                              | `janedoe`          |
| Branch Created, Updated                 |                    |
| Pull Request Created, Updated, Reopened |                    |
| Tag Created, Updated                    |                    |

## build.source

Provides the source branch.

| **Action**                              | **Example values**        |
| --------------------------------------- | ------------------------- |
| Manual Run                              | `main`, `feature/develop` |
| Branch Created, Updated                 | `main`, `feature/develop` |
| Pull Request Created, Updated, Reopened | `main`, `feature/develop` |
| Tag Created, Updated                    | `refs/tags/v1.2.3`        |

## build.target

Provides the target branch.

| **Action**                              | **Example values**        |
| --------------------------------------- | ------------------------- |
| Manual Run                              | `main`                    |
| Branch Created, Updated                 | `main`, `feature/develop` |
| Pull Request Created, Updated, Reopened | `main`                    |
| Tag Created, Updated                    | `refs/tags/v1.2.3`        |

## build.title

Provides the commit message or pull request title for the current running build.

| **Action**                              | **Value**          |
| --------------------------------------- | ------------------ |
| Manual Run                              | Commit message     |
| Branch Created, Updated                 | Commit message     |
| Pull Request Created, Updated, Reopened | Pull request title |
| Tag Created, Updated                    | Commit message     |
