Skip to content
New issue

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

feat!: enable files removal and action rename #48

Merged
merged 9 commits into from
Mar 27, 2023
Merged

feat!: enable files removal and action rename #48

merged 9 commits into from
Mar 27, 2023

Conversation

derberg
Copy link
Owner

@derberg derberg commented Mar 9, 2023

Resolves #46
Resolves #45

once this PR is merged I rename repo to manage-files-in-multiple-repositories and the same the action. I will also release it as v2.

@ReenigneArcher @Tjitse-E please lemme know if you want to review or test before merge


Tests

Case 1

patterns_to_include: CODE_OF_CONDUCT.md,CONTRIBUTING.md
patterns_to_remove: .github/workflows

Expected error:

Error: Fields patterns_to_include and patterns_to_remove are mutually exclusive. If you want to remove files from repos then do not use patterns_to_include.
##[debug]Node Action run completed with exit code 1

Case 2

patterns_to_ignore: .github/workflows/global-workflow.yml,.github/workflows/bump-on-release.yml
patterns_to_remove: .github/workflows

Expected result:
bump-on-release.yml is not removed
first-time-contrib.yml is removed

  Removing files
  ##[debug]DEBUG: Removing files from root /home/runner/work/.github/.github/clones/nie-niet-none Where process.cwd() is /home/runner/work/.github/.github
  ##[debug]DEBUG: Provided patterns .github/workflows relate to the following files .github/workflows/first-time-contrib.yml

PRs:

Case 3

Expected that PR will be created where 1 files will be deletion and 1 addition and 1 modification

patterns_to_ignore: .github/workflows/global-workflow.yml,.github/workflows/bump-on-release.yml
patterns_to_include: .github/workflows

changed in global repo -> lukasz-lab/.github@7dd363b
got PR -> https://github.com/lukasz-lab/piontek/pull/56/files

also one operation, like only addition with no removal also works https://github.com/lukasz-lab/piontek/pull/54/files

@derberg derberg marked this pull request as ready for review March 9, 2023 20:22
@derberg derberg merged commit 54b11fb into main Mar 27, 2023
@derberg derberg deleted the deletefiles branch March 27, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

delete files in destination repo Node.js 12 depreciation warning
1 participant