Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
services
review.typo3.org
gerrit
Commits
0c4e29b3
Commit
0c4e29b3
authored
Jan 29, 2021
by
Stephan Großberndt
Browse files
[TASK] Added patchset-created hook for gerrit-adapter.core.b13.dev
parent
88d58cca
Changes
1
Hide whitespace changes
Inline
Side-by-side
assets/hooks/patchset-created.d/gerrit-adapter.core.b13.dev.phpsh
0 → 100755
View file @
0c4e29b3
#!/usr/bin/php
<?php
require_once
dirname
(
__FILE__
)
.
'/../arguments.php'
;
$args
=
getArguments
();
// do not disclose changes in foreign repositories!
if
(
$args
[
'project'
]
!==
'Packages/TYPO3.CMS'
&&
$args
[
'project'
]
!==
'Teams/Security/TYPO3v4-Core'
)
{
echo
'Will not send anything for repositories except Packages/TYPO3.CMS and Teams/Security/TYPO3v4-Core'
;
exit
;
}
$args
[
'token'
]
=
getenv
(
'HOOK_TOKEN_gerritadaptercoreb13dev'
);
$url
=
'https://gerrit-adapter.core.b13.dev/gerrit'
;
// open connection
$ch
=
curl_init
();
// set the url, number of POST vars, POST data
curl_setopt
(
$ch
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$ch
,
CURLOPT_POSTFIELDS
,
http_build_query
(
$args
));
// execute post
$result
=
curl_exec
(
$ch
);
// close connection
curl_close
(
$ch
);
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment