We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Our CI is completely stuck right now, and during triaging, @maxknv proposed creating a way to stop every running workflow with given name
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
Here's a very raw PoC of brb.py
#!/usr/bin/env python from typing import List from github.WorkflowRun import WorkflowRun from env_helper import GITHUB_REPOSITORY from get_robot_token import get_best_robot_token from github_helper import GitHub gh = GitHub(get_best_robot_token(), per_page=100) repo = gh.get_repo(GITHUB_REPOSITORY) names = ["MasterCI", "PullRequestCI"] states_to_kill = ["queued", "in_progress", "pending", "waiting"] wfs = list(repo.get_workflows()) filtered_wfs = [wf for wf in wfs if wf.state == "active" and wf.name in names] runs = [] # type: List[WorkflowRun] for state in states_to_kill: for wf in filtered_wfs: runs.extend(wf.get_runs(status=state)) for run in runs: print(f"Run {run.cancel_url}") run.cancel()
No branches or pull requests
Our CI is completely stuck right now, and during triaging, @maxknv proposed creating a way to stop every running workflow with given name
The text was updated successfully, but these errors were encountered: