2

I would like to list all Workflow Runs in a Repo for only Develop branch.

I am using the below script. It lists workflows in all the branches under a repo. Could you please help modifying it to list only the specific Branch??

for org_repo in REPOS:
    repo = g.get_repo(f"{ORG_NAME}/{org_repo}")
    workflow_runs = repo.get_workflow_runs()
dbaltor
  • 2,737
  • 3
  • 24
  • 36

1 Answers1

0

I know it's late but someone might get help, you can actually pass branch name as a parameter to get workflow runs for a specific branch.

workflow_runs = repo.get_workflow_runs(branch=branch_name)
Mubashar
  • 40
  • 6