derberg / manage-files-in-multiple-repositories

GitHub Action that introduces support for global workflows. Global workflows are the one you update in just one repo and they are automatically updated in other repositories.
MIT License
51 stars 18 forks source link

Copy files does not work for all of the repo's #43

Closed Tjitse-E closed 1 year ago

Tjitse-E commented 1 year ago

Describe the bug

I'm updating about 40 repo's at once with this Github action, after inspecting the logs i'm seeing that some repo's are skipped:

Started updating *** repo
  Cloning https://github.com/***
  Checking if repo initialized.
  Getting list of branches the action should operate on
  Getting list of all the branches for the repository
  These were requested branches: ^development$
  This is default branch: development
  These is a final list of branches action will operate on: []
  Repo has no branches that the action could operate on

How to Reproduce

I'm not sure what causes this behaviour. Here's my workflow:

name: Copy global workflows

on:
  push:
    branches: [ "master" ]

jobs:
  replicate_changes:
    runs-on: self-hosted
    steps:
      - uses: actions/checkout@v2

      - name: Replicating global workflow
        uses: derberg/copy-files-to-other-repositories@v1.0.3
        with:
          branches: "^development$"
          github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN_GITHUB }}
          patterns_to_ignore: ".github/workflows/global_workflow_copy.yml"
          patterns_to_include: ".github/workflows"
          topics_to_include: "global-workflow"
          exclude_private: false
          exclude_forked: true
          committer_username: "TheArchitect"
          committer_email: "***"
          commit_message: "CI: Update global workflows"

Expected behavior

A PR is created for all repo's/branches that match ^development$.

Tjitse-E commented 1 year ago

I found out that this is happens when the project has more than 30 branches, see fix in #44