Skip to content

Commit

Permalink
Codespaces status support (#62)
Browse files Browse the repository at this point in the history
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max and crazy-max committed Apr 24, 2022
1 parent cc3fc46 commit b9f5497
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
23 changes: 12 additions & 11 deletions README.md
Expand Up @@ -87,17 +87,18 @@ jobs:

Following inputs can be used as `step.with` keys

| Name | Type | Description |
|---------------------------|---------|----------------------------------------------------------------------------------|
| `overall_threshold`**¹** | String | Defines threshold for overall status (also called rollup) of GitHub to fail the job |
| `git_threshold`**²** | String | Defines threshold for Git Operations to fail the job |
| `api_threshold`**²** | String | Defines threshold for API Requests to fail the job |
| `webhooks_threshold`**²** | String | Defines threshold for Webhooks to fail the job |
| `issues_threshold`**²** | String | Defines threshold for Issues to fail the job |
| `prs_threshold`**²** | String | Defines threshold for Pull Requests to fail the job |
| `actions_threshold`**²** | String | Defines threshold for GitHub Actions to fail the job |
| `packages_threshold`**²** | String | Defines threshold for GitHub Packages to fail the job |
| `pages_threshold`**²** | String | Defines threshold for GitHub Pages to fail the job |
| Name | Type | Description |
|--------------------------------|---------|-------------------------------------------------------------------------------------|
| `overall_threshold`**¹** | String | Defines threshold for overall status (also called rollup) of GitHub to fail the job |
| `git_threshold`**²** | String | Defines threshold for Git Operations to fail the job |
| `api_threshold`**²** | String | Defines threshold for API Requests to fail the job |
| `webhooks_threshold`**²** | String | Defines threshold for Webhooks to fail the job |
| `issues_threshold`**²** | String | Defines threshold for Issues to fail the job |
| `prs_threshold`**²** | String | Defines threshold for Pull Requests to fail the job |
| `actions_threshold`**²** | String | Defines threshold for GitHub Actions to fail the job |
| `packages_threshold`**²** | String | Defines threshold for GitHub Packages to fail the job |
| `pages_threshold`**²** | String | Defines threshold for GitHub Pages to fail the job |
| `codespaces_threshold`**²** | String | Defines threshold for Codespaces to fail the job |

> * **¹** Accepted values are `minor`, `major`, `critical` or `maintenance`.
> * **²** Accepted values are `operational`, `degraded_performance`, `partial_outage` `major_outage`, `under_maintenance`.
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Expand Up @@ -34,6 +34,9 @@ inputs:
pages_threshold:
description: 'Defines threshold for GitHub Pages to fail the job (operational, degraded_performance, partial_outage or major_outage)'
required: false
codespaces_threshold:
description: 'Defines threshold for GitHub Codespaces to fail the job (operational, degraded_performance, partial_outage or major_outage)'
required: false

runs:
using: 'node12'
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/githubstatus.ts
Expand Up @@ -26,6 +26,7 @@ export enum Component {
Actions = 'GitHub Actions',
Packages = 'GitHub Packages',
Pages = 'GitHub Pages',
Codespaces = 'Codespaces',
Other = 'Other'
}

Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
Expand Up @@ -26,7 +26,8 @@ async function run() {
[Component.PullRequests, await getComponentStatus('prs_threshold')],
[Component.Actions, await getComponentStatus('actions_threshold')],
[Component.Packages, await getComponentStatus('packages_threshold')],
[Component.Pages, await getComponentStatus('pages_threshold')]
[Component.Pages, await getComponentStatus('pages_threshold')],
[Component.Codespaces, await getComponentStatus('codespaces_threshold')]
]);

// Global
Expand Down

0 comments on commit b9f5497

Please sign in to comment.