Skip to content

Commit e9d89f7

Browse files
committed
Context variable fixes
1 parent d485818 commit e9d89f7

File tree

1 file changed

+53
-51
lines changed

1 file changed

+53
-51
lines changed

docs/context-variables.md

Lines changed: 53 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,18 @@ The `branch` context contains info regarding the branch changes compared to the
9898

9999
compared to the `source` context does not include actual source code.
100100

101-
| Values | Type | Description |
102-
|----------------------|-----------|--------------------------------------------------------- |
103-
| `branch` | Map | Includes the info related to the current branch |
104-
| `branch.author` | String | The branch author (the user that did first commit in the branch). The formatted like author in `git-log`, e.g. `Popeye <[email protected]>` |
105-
| `branch.author_name` | String | The branch author name |
106-
| `branch.author_email` | String | The branch author email |
107-
| `branch.base` | String | The main branch, `main` |
108-
| `branch.commits.messages` | [String] | A list with all the commit messages in this branch |
109-
| `branch.diff.size` | Integer | The sum of line changed: additions, edits and deletions |
110-
| `branch.diff.files_metadata` | [`FileMetadata`](#filemetadata-structure) | List of changed files including their relative path |
111-
| `branch.name` | String | The current branch, `feature-123-branch` |
112-
| `branch.num_of_commits` | Integer | The number of commits in the branch |
101+
| Values | Type | Description |
102+
| ---------------------------- | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
103+
| `branch` | Map | Includes the info related to the current branch |
104+
| `branch.author` | String | The branch author (the user that did first commit in the branch). The formatted like author in `git-log`, e.g. `Popeye <[email protected]>` |
105+
| `branch.author_name` | String | The branch author name |
106+
| `branch.author_email` | String | The branch author email |
107+
| `branch.base` | String | The main branch, `main` |
108+
| `branch.commits.messages` | [String] | A list with all the commit messages in this branch |
109+
| `branch.diff.size` | Integer | The sum of line changed: additions, edits and deletions |
110+
| `branch.diff.files_metadata` | [`FileMetadata`](#filemetadata-structure) | List of changed files including their relative path |
111+
| `branch.name` | String | The current branch, `feature-123-branch` |
112+
| `branch.num_of_commits` | Integer | The number of commits in the branch |
113113

114114
The branch context doesn't include any source code, but only related metadata.
115115

@@ -215,32 +215,34 @@ ui_templates_files:
215215

216216
The `pr` context includes metadata related to the pull request.
217217

218-
| Values | Type | Description |
219-
|--------------------|-----------|-------------------------------------------------|
220-
| `pr` | Map | Includes the info related to the PR |
221-
| `pr.approvals` | [String] | A list of the of reviewers that approved the PR |
222-
| `pr.author` | String | The PR author name |
223-
| `pr.author_teams` | String | The teams which the PR author is member of|
224-
| `pr.author_is_org_member` | Bool | `true` if the PR author is a member of the organization where gitStream is installed |
225-
| `pr.checks` | [[`Check`]](#check-structure) | List of checks, names and status|
226-
| `pr.comments` | [[`Comment`]](#comment-structure) | List of PR comments objects |
227-
| `pr.conflicted_files_count` | Integer | The number files in the PR with conflicts |
228-
| `pr.conversations` | [[`Conversation`]](#conversation-structure) | List of PR conversation objects, usually when reviewer have comments about the source code |
229-
| `pr.created_at` | String | The date and time the PR was created |
230-
| `pr.draft` | Bool | `true` when the PR is marked as Draft/WIP |
231-
| `pr.description` | String | The PR description text |
232-
| `pr.labels` | [String] | The labels that are attached to the PR |
233-
| `pr.number` | Integer | The PR or MR Id number |
234-
| `pr.provider` | String | The Git cloud provider name, e.g. `GitHub`, `GitLab` etc. |
235-
| `pr.reviewers` | [String] | The list of reviewers set for this PR |
236-
| `pr.source` | String | The branch from which the PR originates |
237-
| `pr.status` | String | The PR status: `open`, `closed` and `merged` |
238-
| `pr.target` | String | The branch the PR is intended merged into |
239-
| `pr.title` | String | The PR title |
240-
| `pr.requested_changes` | [String] | List of users that requested changes |
241-
| `pr.reviews` | [[`Review`]](#review-structure) | List of PR reviews, relevant in GitHub |
242-
| `pr.unresolved_threads` | Integer | The number of open review comments in the PR |
243-
| `pr.updated_at` | String | The date and time the PR was last updated |
218+
| Values | Type | Description |
219+
| --------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------ |
220+
| `pr` | Map | Includes the info related to the PR |
221+
| `pr.approvals` | [String] | A list of the of reviewers that approved the PR |
222+
| `pr.assignees` | [String] | A list of the people assigned to this pull request |
223+
| `pr.author` | String | The PR author name |
224+
| `pr.author_is_org_member` | Bool | `true` if the PR author is a member of the organization where gitStream is installed |
225+
| `pr.author_teams` | String | The teams which the PR author is member of |
226+
| `pr.checks` | [[`Check`]](#check-structure) | List of checks, names and status |
227+
| `pr.comments` | [[`Comment`]](#comment-structure) | List of PR comments objects |
228+
| `pr.conflicted_files_count` | Integer | The number files in the PR with conflicts |
229+
| `pr.conversations` | [[`Conversation`]](#conversation-structure) | List of PR conversation objects, usually when reviewer have comments about the source code |
230+
| `pr.created_at` | String | The date and time the PR was created |
231+
| `pr.description` | String | The PR description text |
232+
| `pr.draft` | Bool | `true` when the PR is marked as Draft/WIP |
233+
| `pr.labels` | [String] | The labels that are attached to the PR |
234+
| `pr.number` | Integer | The PR or MR Id number |
235+
| `pr.provider` | String | The Git cloud provider name, e.g. `GitHub`, `GitLab` etc. |
236+
| `pr.requested_changes` | [String] | List of users that requested changes |
237+
| `pr.reviewers` | [String] | The list of reviewers set for this PR |
238+
| `pr.reviews` | [[`Review`]](#review-structure) | List of PR reviews, relevant in GitHub |
239+
| `pr.source` | String | The branch from which the PR originates |
240+
| `pr.status` | String | The PR status: `open`, `closed` and `merged` |
241+
| `pr.target` | String | The branch the PR is intended merged into |
242+
| `pr.title` | String | The PR title |
243+
| `pr.unresolved_threads` | Integer | The number of open review comments in the PR |
244+
| `pr.updated_at` | String | The date and time the PR was last updated |
245+
| `pr.url` | String | A link to the PR on |
244246

245247
Example for checking the PR title includes a Jira ticket:
246248

@@ -264,24 +266,24 @@ has:
264266

265267
The `repo` context includes metadata related to the repo.
266268

267-
| Values | Type | Description |
268-
|--------------------|-----------|-------------------------------------------------|
269-
| `repo` | Map | Includes the info related to the current repo |
270-
| `repo.age` | Integer | Number of days since first commit (of any user) |
271-
| `repo.author_age` | Integer | number of days since first commit to this repo |
272-
| `repo.blame` | [`GitBlame`](#gitblamep-structure) | The percentage each user's lines in a file, the list includes all changed files in the branch. The list is sorted by the `ratio` field |
273-
| `repo.contributors` | [`Contributor`](#contributor-structure) | List of contributors in the repo |
274-
| `repo.git_activity` | [`GitActivity`](#gitactivity-structure) | Per file and user, the number of lines changed every week for the last 52 weeks |
275-
| `repo.name` | String | Repository name |
276-
| `repo.owner` | String | Repository owner account name |
277-
| `repo.visibility` | String | The visibility of the source branch repo. Value is one of: `private`, `internal`, or `public` |
269+
| Values | Type | Description |
270+
| ------------------- | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
271+
| `repo` | Map | Includes the info related to the current repo |
272+
| `repo.age` | Integer | Number of days since first commit (of any user) |
273+
| `repo.author_age` | Integer | number of days since first commit to this repo |
274+
| `repo.blame` | [`GitBlame`](#gitblamep-structure) | The percentage each user's lines in a file, the list includes all changed files in the branch. The list is sorted by the `ratio` field |
275+
| `repo.contributors` | [`Contributor`](#contributor-structure) | List of contributors in the repo |
276+
| `repo.git_activity` | [`GitActivity`](#gitactivity-structure) | Per file and user, the number of lines changed every week for the last 52 weeks |
277+
| `repo.name` | String | Repository name |
278+
| `repo.owner` | String | Repository owner account name |
279+
| `repo.visibility` | String | The visibility of the source branch repo. Value is one of: `private`, `internal`, or `public` |
278280

279281
#### `source`
280282

281283
The `source` context includes a list of `FileDiff` objects that can be used to get insights based on code changes. The changes compared to the latest main branch.
282284

283-
| Values | Type | Description |
284-
|---------------------|-------|--------------------------------------------------- |
285+
| Values | Type | Description |
286+
| ------------------- | --------------------------------- | --------------------------------------------- |
285287
| `source.diff.files` | [`FileDiff`](#filediff-structure) | List of changed files with their code changes |
286288

287289
The source context include all code changes, it is not safe to share it with unknown services.

0 commit comments

Comments
 (0)