mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-23 06:56:53 +00:00
[index] Use function instead of building GitHub issue link manually
This commit is contained in:
parent
172cd491c1
commit
7eb13612e6
28
index.php
28
index.php
@ -166,21 +166,15 @@ try {
|
||||
$bridge->setCache($cache);
|
||||
$bridge->setDatas($params);
|
||||
} catch(Exception $e){
|
||||
$title = urlencode($bridge->getName() . ' failed with error ' . $e->getCode());
|
||||
$title = $bridge->getName() . ' failed with error ' . $e->getCode();
|
||||
|
||||
// Build a GitHub compatible message
|
||||
$body = urlencode('Error message: `'
|
||||
$body = 'Error message: `'
|
||||
. $e->getmessage()
|
||||
. "`\nQuery string: `"
|
||||
. $_SERVER['QUERY_STRING'] . '`'
|
||||
);
|
||||
. $_SERVER['QUERY_STRING'] . '`';
|
||||
|
||||
$link = 'https://github.com/rss-bridge/rss-bridge/issues/new?title='
|
||||
. $title
|
||||
. '&body='
|
||||
. $body
|
||||
. '&labels=bug+report&assignee='
|
||||
. $bridge->getMaintainer();
|
||||
$link = buildGitHubIssueQuery($title, $body, 'bug report', $bridge->getMaintainer());
|
||||
|
||||
$message = <<<EOD
|
||||
<!DOCTYPE html>
|
||||
@ -213,21 +207,15 @@ EOD;
|
||||
$format->setExtraInfos($bridge->getExtraInfos());
|
||||
$format->display();
|
||||
} catch(Exception $e){
|
||||
$title = urlencode($bridge->getName() . ' failed with error ' . $e->getCode());
|
||||
$title = $bridge->getName() . ' failed with error ' . $e->getCode();
|
||||
|
||||
// Build a GitHub compatible message
|
||||
$body = urlencode('Error message: `'
|
||||
$body = 'Error message: `'
|
||||
. $e->getmessage()
|
||||
. "`\nQuery string: `"
|
||||
. $_SERVER['QUERY_STRING'] . '`'
|
||||
);
|
||||
. $_SERVER['QUERY_STRING'] . '`';
|
||||
|
||||
$link = 'https://github.com/rss-bridge/rss-bridge/issues/new?title='
|
||||
. $title
|
||||
. '&body='
|
||||
. $body
|
||||
. '&labels=bug+report&assignee='
|
||||
. $bridge->getMaintainer();
|
||||
$link = buildGitHubIssueQuery($title, $body, 'bug report', $bridge->getMaintainer());
|
||||
|
||||
$message = <<<EOD
|
||||
<!DOCTYPE html>
|
||||
|
Loading…
Reference in New Issue
Block a user