Skip to content

grindsa/gh_action_manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action Manager

A CLI tool to manage GitHub Actions workflows and jobs across multiple repositories.

Features

  • Authenticate with a GitHub token
  • List workflow runs filtered by branch or commit
  • Display logs/status in a hierarchical format
  • Restart failed jobs by job-id or group success

Personal Access Token Permissions

To use this tool, you must provide a GitHub personal access token (PAT) with appropriate permissions. The required scopes are:

  • repo: Full control of private repositories (for accessing and managing workflows in private repos)
  • workflow: Update GitHub Action workflows

Usage

python gh_action_manager.py --repository owner/repo --token <token> [options]

Options

  • --branch <branch>: Filter by branch
  • --commit <sha>: Filter by commit SHA
  • --exclude-success: Exclude jobs with status 'success' from output and skip workflow runs where all jobs succeeded
  • --restart-majority: Restart all failed jobs in a workflow run if the percentage of successful jobs meets the threshold
  • --restart-threshold <percent>: Threshold percentage of successful jobs to trigger restart (default: 75)
  • --restart <job-id>: Restart job by job-id (future/optional)
  • --restart-group: Restart failed jobs by group success (future/optional)

Example

Show only failed jobs and restart failed jobs if at least 80% succeeded:

python gh_action_manager.py --repository grindsa/acme2certifier --token <token> --exclude-success --restart-majority --restart-threshold 80

Requirements

  • Python 3.8+
  • requests
  • rich (optional, for pretty output)

Install dependencies:

pip install -r requirements.txt

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages