Skip to content

Commit 48ffb65

Browse files
authored
Document CommitStatus structure in context variables (#823)
* Document CommitStatus structure in context variables * add note
1 parent 3296ab0 commit 48ffb65

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/context-variables.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ The `pr` context includes metadata related to the pull request.
281281
| `pr.author_teams` | String | The teams which the PR author is member of |
282282
| `pr.checks` | [[`Check`]](#check-structure) | List of checks, names and status |
283283
| `pr.comments` | [[`Comment`]](#comment-structure) | List of PR comments objects |
284+
| `pr.commit_statuses` :fontawesome-brands-github: | [[`CommitStatus`]](#commitstatus-structure) | List of commit status check objects from external CI systems. |
284285
| `pr.conflicted_files_count` | Integer | The number files in the PR with conflicts |
285286
| `pr.conversations` | [[`Conversation`]](#conversation-structure) | List of PR conversation objects, usually when reviewer have comments about the source code |
286287
| `pr.created_at` | String | The date and time the PR was created |
@@ -368,6 +369,29 @@ The source context include all code changes, it is not safe to share it with unk
368369
}
369370
```
370371

372+
#### `CommitStatus` structure :fontawesome-brands-github:
373+
374+
Represents the status of external CI systems like Docker builds or test results. Note gitStream doesn't respond to commit status events, only collects them when other events trigger.
375+
376+
```json
377+
{
378+
"state": String, # The status of the check: `pending`, `success`, `failure`, `error`
379+
"context": String, # The identifier for the CI system or check (e.g., "continuous-integration/jenkins")
380+
"description": String # Human-readable description of the status (e.g., "The build succeeded!")
381+
}
382+
```
383+
384+
Example:
385+
```json
386+
[
387+
{
388+
"state": "pending",
389+
"context": "continuous-integration/jenkins",
390+
"description": "The build succeeded!"
391+
}
392+
]
393+
```
394+
371395
#### `Conversation` structure
372396

373397
```json

0 commit comments

Comments
 (0)