Skip to content

Commit

Permalink
Merge pull request #699 from bennettoxford/aw/workflows
Browse files Browse the repository at this point in the history
Tidy up workflows commands
  • Loading branch information
alarthast authored Jan 22, 2025
2 parents aebec48 + 4cd630d commit 0cddb32
Show file tree
Hide file tree
Showing 4 changed files with 374 additions and 164 deletions.
59 changes: 39 additions & 20 deletions bennettbot/job_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,65 +303,84 @@
"restricted": True,
"description": "Report GitHub Actions workflow runs",
"jobs": {
"check_links": {
"run_args_template": "python jobs.py custom --job-name check-links",
"display_emoji_key": {
"run_args_template": "python jobs.py key",
"report_stdout": True,
"report_format": "blocks",
},
"display_emoji_key": {
"run_args_template": "python jobs.py key",
"display_usage": {
"run_args_template": "python jobs.py usage",
"report_stdout": True,
},
"show": {
"run_args_template": "python jobs.py show --target {target}",
"report_stdout": True,
"report_format": "blocks",
},
"show_all": {
"run_args_template": "python jobs.py show --target all",
"run_args_template": "python jobs.py show",
"report_stdout": True,
"report_format": "blocks",
},
"show_failed": {
"run_args_template": "python jobs.py show --target all --skip-successful",
"run_args_template": "python jobs.py show --target {target} --skip-successful",
"report_stdout": True,
"report_format": "blocks",
},
"show": {
"run_args_template": "python jobs.py show --target {target}",
"show_failed_all": {
"run_args_template": "python jobs.py show --skip-successful",
"report_stdout": True,
"report_format": "blocks",
},
"show_group": {
"run_args_template": "python jobs.py show --group {group}",
"report_stdout": True,
"report_format": "blocks",
},
},
"slack": [
{
"command": "check-links",
"help": "Summarise GitHub Actions workflow runs for link-checking workflows in website repos.",
"action": "schedule_job",
"job_type": "check_links",
},
{
"command": "key",
"help": "Show the emoji key being used in the workflow summaries.",
"action": "schedule_job",
"job_type": "display_emoji_key",
},
{
"command": "show all",
"command": "usage",
"help": "Show help message for the `show [target]` and `show-failed [target]` commands.",
"action": "schedule_job",
"job_type": "display_usage",
},
{
"command": "show",
"help": "Summarise GitHub Actions workflow runs for repos in all organisations.",
"action": "schedule_job",
"job_type": "show_all",
},
{
"command": "show-failed",
"help": "Summarise GitHub Actions workflow runs for repos in all organisations, skipping repos whose runs are all successful.",
"help": "Summarise unsuccessful GitHub Actions workflow runs for repos in all organisations.",
"action": "schedule_job",
"job_type": "show_failed",
"job_type": "show_failed_all",
},
{
"command": "show [target]",
# There is a line break in this help message because it will take two lines anyway and breaking here gives better readability.
"help": "Summarise GitHub Actions workflow runs for a given `target` organisation or repo, provided in the form of `org` or `org/repo`. \n(Note: `org` is limited to the following shorthands and their full names: `os (opensafely)`, `osc (opensafely-core)`, `bo (bennettoxford)`, `ebm (ebmdatalab)`.)",
"help": "Summarise GitHub Actions workflow runs for `target`. See `workflows usage` for valid `target` values.",
"action": "schedule_job",
"job_type": "show",
},

{
"command": "show-failed [target]",
"help": "Same as `show [target]`, but skips summarising repos whose runs are all successful.",
"action": "schedule_job",
"job_type": "show_failed",
},
{
"command": "show-group",
"help": "Summarise GitHub Actions workflow runs for a custom defined group of workflows.",
"action": "schedule_job",
"job_type": "show_group",
},
]
},
"techsupport": {
Expand Down
Loading

0 comments on commit 0cddb32

Please sign in to comment.