diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-07-07 12:09:18 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-07-07 12:09:18 +0300 |
commit | 81b8f1233f164ae5d2c9d05e1fcc41309120604c (patch) | |
tree | 5a77852166c6a19efb5ca68975a227a7ab5eef21 /changelog | |
parent | 51b0851a3d16d168f61c1f40102ed6613dff50a8 (diff) |
Properly remove stable channel hints from changelog and do not mention bot in pending PRs
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'changelog')
-rw-r--r-- | changelog/index.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/changelog/index.php b/changelog/index.php index 884a6ee..d6ac925 100644 --- a/changelog/index.php +++ b/changelog/index.php @@ -35,7 +35,7 @@ class GenerateChangelogCommand extends Command } protected function cleanTitle($title) { - $title = preg_replace('!(\[|\()(stable)? ?(10|11|12|13|14|15|16|17)(\]|\))?\W*!i', '', $title); + $title = preg_replace('!(\[|\()(stable)? ?\d\d(\]|\))?\W*!i', '', $title); $title = preg_replace('!^\[security\]!i', '', $title); $title = trim($title); return strtoupper(substr($title, 0, 1)) . substr($title, 1); @@ -200,7 +200,11 @@ class GenerateChangelogCommand extends Command } catch (\Github\Exception\RuntimeException $e) { if ($e->getMessage() === 'Not Found') { $output->writeln('<error>Could not find base or head reference on ' . $repoName. '.</error>'); - return; + // print 3 empty lines to not overwrite the error message with the progress bar + $output->writeln(''); + $output->writeln(''); + $output->writeln(''); + continue; } throw $e; } @@ -391,11 +395,14 @@ QUERY; $repoName = $data['repoName']; $number = $data['number']; $title = $data['title']; - $author = $data['author']; + $author = '@' . $data['author']; + if ($author === '@backportbot-nextcloud') { + $author = ''; + } if ($repoName === 'server') { - $output->writeln("* [ ] #$number $title @$author"); + $output->writeln("* [ ] #$number $title $author"); } else { - $output->writeln("* [ ] [$repoName#$number](https://github.com/$orgName/$repoName/pull/$number) $title @$author"); + $output->writeln("* [ ] [$repoName#$number](https://github.com/$orgName/$repoName/pull/$number) $title $author"); } } break; |