Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webhook-test-zsy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张思远
webhook-test-zsy
Commits
ea604d3b
Commit
ea604d3b
authored
Dec 21, 2023
by
张思远
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell
parent
651ba208
Pipeline
#158
canceled with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
t.sh
t.sh
+3
-0
webhook.php
webhook.php
+13
-6
No files found.
t.sh
0 → 100644
View file @
ea604d3b
#!/bin/bash
git pull
\ No newline at end of file
webhook.php
View file @
ea604d3b
<?php
<?php
header
(
'Content-type:text/html;charset=utf-8'
);
header
(
'Content-type:text/html;charset=utf-8'
);
$post
=
file_get_contents
(
"php://input"
);
$post
=
file_get_contents
(
"php://input"
);
$post
=
json_decode
(
$post
,
true
);
$post
=
json_decode
(
$post
,
true
);
$project
=
$post
[
'project'
];
$web_url
=
$project
[
'web_url'
];
$web_url
=
str_replace
(
'http://'
,
'https://'
,
$web_url
);
// echo $web_url;exit;
$dir
=
__DIR__
;
$cmd
=
't.bat '
.
$dir
.
' '
.
$web_url
;
if
(
strpos
(
strtoupper
(
PHP_OS
),
'WIN'
)
===
0
)
{
$project
=
$post
[
'project'
];
$web_url
=
$project
[
'web_url'
];
$web_url
=
str_replace
(
'http://'
,
'https://'
,
$web_url
);
// echo $web_url;exit;
$dir
=
__DIR__
;
$cmd
=
't.bat '
.
$dir
.
' '
.
$web_url
;
}
else
{
$cmd
=
't.sh'
;
}
$descriptorspec
=
[
$descriptorspec
=
[
[
"pipe"
,
"r"
],
// stdin
[
"pipe"
,
"r"
],
// stdin
[
"pipe"
,
"w"
],
// stdout
[
"pipe"
,
"w"
],
// stdout
...
...
Write
Preview
Markdown
is supported
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