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
53 stars 19 forks source link

fix: use strict regex for default branch #37

Closed hairmare closed 2 years ago

hairmare commented 2 years ago

Description

When targeting the default branch, the action matches any branch that contains the name of the branch.

I noticed once it had created bot/manual-update-global-workflow-bot/update-global-workflow-bot/manual-update-global-workflow-main-682z1c-f9d96be555d6c90b389ed89c3de7038c325182ea-3psjvl 😂

I added some examples with main in various parts of branch names to the "should return default branch if others not requested" test for filterOutMissingBranches.

The current behaviour can still be achieved with branches: main once this is merged. Maybe that should be changed as well, i'm not sure.

Related issue(s)

derberg commented 2 years ago

sorry for such a turtle reaction 😞 thanks a lot for the PR!