Skip to content

Commit f102e4a

Browse files
committed
[BUGFIX] 🐛 Add missing repo file
The recently added discover task is missing the template file in the commit.
1 parent 294ce83 commit f102e4a

3 files changed

Lines changed: 20 additions & 4 deletions

File tree

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ to see how Patchbot helps reduce technical debt across Git repositories.
4444
- Repository filtering - Target specific repos by path pattern or GitLab topic (`--filter`)
4545
- Dry-run mode - Preview what would happen without making changes (`--dry-run`)
4646
- Custom git user - Push as a bot user instead of your personal account
47+
- Import and export - Quickly import patches from GitHub Gists or Git repositories
4748
- Multi-language patches - Write patch scripts in PHP, Shell, Python, or as Git diffs
4849
- CI-ready - Run Patchbot as a scheduled GitLab CI pipeline
4950

@@ -88,9 +89,11 @@ Or install Patchbot as a dependency in an existing project:
8889
composer require pixelbrackets/patchbot
8990
```
9091

92+
### Access rights
93+
9194
The user running Patchbot needs clone and push access to the target repositories.
9295
SSH is the recommended protocol. See the
93-
[walkthrough guide](docs/walkthrough.md#access-rights)
96+
[walkthrough guide](docs/walkthrough.md#1-set-up-access)
9497
for details on configuring access.
9598

9699
## Usage
@@ -217,7 +220,8 @@ cp .env.example .env
217220
```
218221

219222
This creates a `repositories.json` file with all discovered repositories,
220-
including their clone URLs and default branches.
223+
including their clone URLs and default branches. When you don't have GitLab
224+
it will create a template file for you instead.
221225

222226
### Merge feature branches
223227

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"generated": "manual",
3+
"repositories": [
4+
{
5+
"path_with_namespace": "user/example-project",
6+
"clone_url_ssh": "git@gitlab.com:user/example-project.git",
7+
"clone_url_http": "https://gitlab.com/user/example-project.git",
8+
"default_branch": "main",
9+
"topics": []
10+
}
11+
]
12+
}

src/RoboFile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,7 @@ protected function loadRepositories(array|string $filters = []): ?array
12821282
*/
12831283
protected function offerRepositoriesTemplate(): int
12841284
{
1285-
$outputFile = 'repositories.json';
1285+
$outputFile = getcwd() . '/repositories.json';
12861286

12871287
if (is_file($outputFile)) {
12881288
return 1;
@@ -1302,7 +1302,7 @@ protected function offerRepositoriesTemplate(): int
13021302

13031303
$templateFile = __DIR__ . '/../resources/templates/repositories.json';
13041304
$this->taskFilesystemStack()
1305-
->copy($templateFile, getcwd() . '/' . $outputFile)
1305+
->copy($templateFile, $outputFile)
13061306
->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_DEBUG)
13071307
->run();
13081308

0 commit comments

Comments
 (0)