Set GitHub Build Status
- 14 May 2021
- 1 Minute to read
-
Print
-
DarkLight
-
PDF
Set GitHub Build Status
- Updated on 14 May 2021
- 1 Minute to read
-
Print
-
DarkLight
-
PDF
This is generated from the built in components of BuildMaster 7.0.0, and may be different than what you have installed (especially if you have extensions); go to [User Icon] -> Documentation within your BuildMaster instance to see exactly what operations are available.
Set GitHub Build Status
Sets a status message on a GitHub commit.
Script usage:
GitHub::Set-Status( [AdditionalContext: <text>], CommitHash: <text>, Status: <integer>, [Description: <text>], [NormalDescription: <text>], [WarningDescription: <text>], [ErrorDescription: <text>], [From: <text>], [UserName: <text>], [Password: <SecureString>], [Organization: <text>], [Repository: <text>], [ApiUrl: <text>] );
Arguments:
Name | Format | Script Usage | Usage Notes |
---|---|---|---|
Additional context | text | AdditionalContext | Appears in the commit status dialog on GitHub after "ci/buildmaster". Used to differentiate between multiple BuildMaster statuses on the same commit. In most cases, it is safe to leave this blank. |
☆ Git commit hash | text | CommitHash | This argument is required. |
☆ Status | integer | Status | This argument is required. |
Description | text | Description | Used for all statuses except 'auto' |
Complete (success) | text | NormalDescription | |
Complete (warning) | text | WarningDescription | |
Complete (error) | text | ErrorDescription | |
From GitHub resource | text | From | |
User name | text | UserName | |
Password | SecureString | Password | |
Organization name | text | Organization | |
Repository name | text | Repository | |
API URL | text | ApiUrl | Use URL from Github resource. |
Example:
try { GitHub::Set-Status ( Status = pending, ... ); ... } catch { # make sure the status is set even if the build fails. error; } GitHub::Set-Status ( Status = auto, ... );
Was this article helpful?