Skip to content

Commit 5a09f6c

Browse files
committed
[github] Rename CODEOWNERS template resource (#67)
1 parent af56b86 commit 5a09f6c

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Generated by fast-forward/dev-tools.
1+
# Generated by fast-forward/dev-tools
2+
#
23
# Review the generated owners before committing this file.
34
#
45
# When no GitHub owners can be inferred automatically, replace the placeholder
@@ -7,5 +8,6 @@
78
#
89
# Example:
910
# * @your-github-user @your-org/platform-team
11+
1012
{{ suggestions }}
1113
{{ rule }}

src/CodeOwners/CodeOwnersGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static function (string $owner): string {
129129
public function generate(?array $owners = null): string
130130
{
131131
$owners ??= $this->inferOwners();
132-
$template = $this->filesystem->readFile($this->fileLocator->locate('resources/CODEOWNERS'));
132+
$template = $this->filesystem->readFile($this->fileLocator->locate('resources/CODEOWNERS.dist'));
133133
$suggestionBlock = [] === $owners
134134
? '# No GitHub owners could be inferred from composer.json metadata.'
135135
: '';

tests/CodeOwners/CodeOwnersGeneratorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ protected function setUp(): void
6767
$this->filesystem = $this->prophesize(FilesystemInterface::class);
6868
$this->fileLocator = $this->prophesize(FileLocatorInterface::class);
6969

70-
$this->fileLocator->locate('resources/CODEOWNERS')
71-
->willReturn('/package/resources/CODEOWNERS');
72-
$this->filesystem->readFile('/package/resources/CODEOWNERS')
70+
$this->fileLocator->locate('resources/CODEOWNERS.dist')
71+
->willReturn('/package/resources/CODEOWNERS.dist');
72+
$this->filesystem->readFile('/package/resources/CODEOWNERS.dist')
7373
->willReturn(<<<'TEXT'
7474
# Header
7575
{{ suggestions }}

0 commit comments

Comments
 (0)