Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use paginator and allow including only failed jobs #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nvm --auto
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.11
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This action will post workflow status notifications into your Slack channel. The
| **slack_webhook_url** | _required_ | Create a Slack Webhook URL using the [Incoming Webhooks App](https://slack.com/apps/A0F7XDUAZ-incoming-webhooks?next_id=0). It is recommended that you create a new secret on your repo `SLACK_WEBHOOK_URL` for holding this value, and passing it to the action with `${{secrets.SLACK_WEBHOOK_URL}}`.
| **repo_token** | _required_ | A token is automatically available in your workflow secrets var. `${{secrets.GITHUB_TOKEN}}`. You can optionally send an alternative self-generated token.
| **include_jobs** | _optional_ | When set to `true`, include individual job status and durations in the slack notification. When `false` only the event status and workflow status lines are included. When set to `on-failure` — individual job status is reported only if workflow failed. Default is `true`.
| **jobs_to_fetch** | _optional_ | Sets the number of jobs to fetch (for workflows with big number of jobs). Default is 30.
| **jobs_to_include** | _optional_ | Should all jobs be included or only the ones that failed. When set to `failed` only the failed jobs are included in the message. the Default is `all`.
| **include_commit_message** | _optional_ | When set to `true`, include the workflow head commit message title in the slack notification. Default is `false`.
| **channel** | _optional_ | Accepts a Slack channel name where you would like the notifications to appear. Overrides the default channel created with your webhook.
| **name** | _optional_ | Allows you to provide a name for the slack bot user posting the notifications. Overrides the default name created with your webhook.
Expand Down
10 changes: 7 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,18 @@ inputs:
description: 'Should the slack notification include individual job status and run times'
required: true
default: "true"
jobs_to_include:
description: 'Should all jobs be included or only the ones that failed'
required: true
default: "all"
include_commit_message:
description: 'Should the slack notification include the head commit message'
required: true
default: "false"
jobs_to_fetch:
description: 'Number of jobs to fetch (for workflows with big number of jobs)'
custom_message:
description: 'Custom message to include in the slack notification'
required: false
default: '30'
default: ""
runs:
using: 'node20'
main: 'dist/index.js'
45,065 changes: 35,494 additions & 9,571 deletions dist/index.js

Large diffs are not rendered by default.

Loading