@@ -114,7 +114,7 @@ function parseReleaseBody(string $body, string $user, string $repo): string
114
114
}, $ body );
115
115
116
116
$ github_client = new Client ();
117
- $ github_client ->authenticate (getenv ('TG_GITHUB_AUTH_USER ' ), getenv ('TG_GITHUB_AUTH_TOKEN ' ), Client::AUTH_ACCESS_TOKEN );
117
+ $ github_client ->authenticate (getenv ('TG_GITHUB_AUTH_USER ' ), getenv ('TG_GITHUB_AUTH_TOKEN ' ), Client::AUTH_CLIENT_ID );
118
118
$ github_client ->addCache (new Pool (new MySQL (
119
119
new PDO ('mysql:dbname= ' . getenv ('TG_DB_DATABASE ' ) . ';host= ' . getenv ('TG_DB_HOST ' ), getenv ('TG_DB_USER ' ), getenv ('TG_DB_PASSWORD ' ))
120
120
)));
@@ -131,7 +131,7 @@ function parseReleaseBody(string $body, string $user, string $repo): string
131
131
/** @var Issue $issue */
132
132
$ issue = $ github_client ->issue ()->show ($ user , $ repo , $ id );
133
133
return "[ {$ text }]( {$ issue ['html_url ' ]}) " ;
134
- } catch (Throwable $ e ) {
134
+ } catch (Throwable ) {
135
135
// Silently ignore.
136
136
}
137
137
@@ -140,7 +140,7 @@ function parseReleaseBody(string $body, string $user, string $repo): string
140
140
/** @var PullRequest $pr */
141
141
$ pr = $ github_client ->pr ()->show ($ user , $ repo , $ id );
142
142
return "[ {$ text }]( {$ pr ['html_url ' ]}) " ;
143
- } catch (Throwable $ e ) {
143
+ } catch (Throwable ) {
144
144
// Silently ignore.
145
145
}
146
146
@@ -173,7 +173,7 @@ function sendTelegramMessage(string $chat_id, string $text): ?ServerResponse
173
173
return Request::sendMessage (compact ('chat_id ' , 'text ' , 'parse_mode ' ));
174
174
} catch (TelegramException $ e ) {
175
175
TelegramLog::error ($ e ->getMessage ());
176
- } catch (Throwable $ e ) {
176
+ } catch (Throwable ) {
177
177
// Silently ignore.
178
178
}
179
179
@@ -185,10 +185,10 @@ function sendTelegramMessage(string $chat_id, string $text): ?ServerResponse
185
185
*/
186
186
function pullLatestAndUpdate (): void
187
187
{
188
- exec ('sudo -u www-data /usr/bin/git stash ' );
189
- exec ('sudo -u www-data /usr/bin/git fetch ' );
190
- exec ('sudo -u www-data /usr/bin/git reset --hard ' );
191
- exec ('sudo -u www-data /usr/bin/git rebase ' );
192
- exec ('sudo -u www-data /usr/bin/git pull ' );
193
- exec ('sudo -u www-data /usr/local/bin/composer install --no-dev ' );
188
+ exec ('/usr/bin/git stash ' );
189
+ exec ('/usr/bin/git fetch ' );
190
+ exec ('/usr/bin/git reset --hard ' );
191
+ exec ('/usr/bin/git rebase ' );
192
+ exec ('/usr/bin/git pull ' );
193
+ exec ('/usr/local/bin/composer install --no-dev ' );
194
194
}
0 commit comments