fix: include git tag in version (#3000)

Also include os and php version in github issue template.
This commit is contained in:
Dag 2022-09-04 07:21:57 +02:00 committed by GitHub
parent 693d6edfbf
commit 5e09a14acc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -222,7 +222,7 @@ class DisplayAction implements ActionInterface
return sprintf('https://github.com/RSS-Bridge/rss-bridge/issues/new?%s', http_build_query([
'title' => sprintf('%s failed with error %s', $bridge->getName(), $e->getCode()),
'body' => sprintf(
"```\n%s\n\n%s\n\nQuery string:%s\nVersion:%s\nOs:%s\nPHP version:%s\n```",
"```\n%s\n\n%s\n\nQuery string: %s\nVersion: %s\nOs: %s\nPHP version: %s\n```",
$message,
implode("\n", create_sane_stacktrace($e)),
$_SERVER['QUERY_STRING'] ?? '',

View File

@ -194,7 +194,7 @@ final class Configuration
if (isset($parts[3])) {
$branchName = $parts[3];
if (file_exists($revisionHashFile)) {
return 'git.' . $branchName . '.' . substr(file_get_contents($revisionHashFile), 0, 7);
return sprintf('%s (git.%s.%s)', self::VERSION, $branchName, substr(file_get_contents($revisionHashFile), 0, 7));
}
}
}

View File

@ -18,7 +18,13 @@
Query string: <?= e($_SERVER['QUERY_STRING'] ?? '') ?>
</p>
<p>
Version: <?= e(Configuration::getVersion()) ?>
Version: <?= raw(Configuration::getVersion()) ?>
</p>
<p>
OS: <?= raw(PHP_OS_FAMILY) ?>
</p>
<p>
PHP version: <?= raw(phpversion() ?: 'Unknown'()) ?>
</p>
<div class="advice">