Skip to content

Commit

Permalink
merge front code
Browse files Browse the repository at this point in the history
  • Loading branch information
lxerxa committed Nov 4, 2019
1 parent ad66f81 commit 0a0e3d0
Show file tree
Hide file tree
Showing 47 changed files with 286 additions and 286 deletions.
24 changes: 9 additions & 15 deletions app/Console/Commands/SendEmails.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,45 +281,39 @@ public function otherNoticeHandle($project, $activity)
}
else if ($activity['event_key'] == 'release_version')
{
$release_versionid = isset($activity['data']['release_version']) ? $activity['data']['release_version'] : '';
if (!$release_versionid)
$release_version = isset($activity['data']) ? $activity['data'] : [];
if (!$release_version)
{
return;
}

$version = Version::find($release_versionid);
if (!$version) { return; }

$released_issues = DB::collection('issue_' . $project->key)
->where('resolve_version', $release_versionid)
->where('resolve_version', $release_version['_id'])
->where('resolution', '<>', 'Unresolved')
->where('del_flg', '<>', 1)
->get();

$data = [
'project' => $project,
'released_issues' => $released_issues,
'resolve_version' => [ 'id' => $version->id, 'name' => $version->name ],
'resolve_version' => [ 'id' => $release_version['_id'], 'name' => $release_version['name'] ],
'user' => $activity['user'],
'http_host' => $this->http_host,
];

$subject = '[' . $this->mail_prefix . '] ' . $project->key . ': 版本-' . $version->name . ' 发布';
$subject = '[' . $this->mail_prefix . '] ' . $project->key . ': 版本-' . $release_version['name'] . ' 发布';

$template = 'emails.version_release';
}
else if ($activity['event_key'] == 'create_release_version')
{
$released_issueids = isset($activity['data']['released_issues']) ? $activity['data']['released_issues'] : [];
$release_versionid = isset($activity['data']['release_version']) ? $activity['data']['release_version'] : '';
if (!$released_issueids || !$release_versionid)
$release_version = isset($activity['data']['release_version']) ? $activity['data']['release_version'] : [];
if (!$released_issueids || !$release_version)
{
return;
}

$version = Version::find($release_versionid);
if (!$version) { return; }

$released_issues = DB::collection('issue_' . $project->key)
->whereIn('_id', $released_issueids)
->where('del_flg', '<>', 1)
Expand All @@ -328,12 +322,12 @@ public function otherNoticeHandle($project, $activity)
$data = [
'project' => $project,
'released_issues' => $released_issues,
'resolve_version' => [ 'id' => $version->id, 'name' => $version->name ],
'resolve_version' => [ 'id' => $release_version['_id'], 'name' => $release_version['name'] ],
'user' => $activity['user'],
'http_host' => $this->http_host,
];

$subject = '[' . $this->mail_prefix . '] ' . $project->key . ': 版本-' . $version->name . ' 发布';
$subject = '[' . $this->mail_prefix . '] ' . $project->key . ': 版本-' . $release_version['name'] . ' 发布';

$template = 'emails.version_release';
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/ExternalUsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function handle(Request $request, $project_key)
{
throw new \UnexpectedValueException('the password cannot be empty.', -16003);
}
$data['pwd'] = md5($pwd);
$data['pwd'] = $pwd;
}

$data['project_key'] = $project_key;
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/WebhookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function exec($type, $project_key)
return Response()->json([ 'ecode' => -5, 'emsg' => 'the event has error.' ]);
}

$token = env('GITLAB_WEBHOOK_TOKEN', '');
$token = $external_user->pwd ?: '';
if (!$token || $token !== $_SERVER['HTTP_X_GITLAB_TOKEN'])
{
return Response()->json([ 'ecode' => -1, 'emsg' => 'the token has error.' ]);
Expand All @@ -65,7 +65,7 @@ public function exec($type, $project_key)
return Response()->json([ 'ecode' => -5, 'emsg' => 'the event has error.' ]);
}

$token = env('GITHUB_WEBHOOK_TOKEN', '');
$token = $external_user->pwd ?: '';
if (!$token)
{
return Response()->json([ 'ecode' => -1, 'emsg' => 'the token can not be empty.' ]);
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions public/assets/activity-19d801cd8d8097cefc3e.js

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions public/assets/activity-84397989593b11928a6a.js

This file was deleted.

2 changes: 2 additions & 0 deletions public/assets/config-19d801cd8d8097cefc3e.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions public/assets/config-84397989593b11928a6a.js

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions public/assets/field-19d801cd8d8097cefc3e.js

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions public/assets/field-84397989593b11928a6a.js

This file was deleted.

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions public/assets/issue-19d801cd8d8097cefc3e.js

Large diffs are not rendered by default.

22 changes: 0 additions & 22 deletions public/assets/issue-84397989593b11928a6a.js

This file was deleted.

26 changes: 26 additions & 0 deletions public/assets/kanban-19d801cd8d8097cefc3e.js

Large diffs are not rendered by default.

26 changes: 0 additions & 26 deletions public/assets/kanban-84397989593b11928a6a.js

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions public/assets/priority-19d801cd8d8097cefc3e.js

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions public/assets/priority-84397989593b11928a6a.js

This file was deleted.

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions public/assets/report-19d801cd8d8097cefc3e.js

Large diffs are not rendered by default.

14 changes: 0 additions & 14 deletions public/assets/report-84397989593b11928a6a.js

This file was deleted.

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions public/assets/role-19d801cd8d8097cefc3e.js

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions public/assets/role-84397989593b11928a6a.js

This file was deleted.

6 changes: 6 additions & 0 deletions public/assets/screen-19d801cd8d8097cefc3e.js

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions public/assets/screen-84397989593b11928a6a.js

This file was deleted.

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions public/assets/summary-19d801cd8d8097cefc3e.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions public/assets/summary-84397989593b11928a6a.js

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions public/assets/type-19d801cd8d8097cefc3e.js

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions public/assets/type-84397989593b11928a6a.js

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions public/assets/webhooks-19d801cd8d8097cefc3e.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions public/assets/wfconfig-19d801cd8d8097cefc3e.js

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions public/assets/wfconfig-84397989593b11928a6a.js

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions public/scripts/app.js

Large diffs are not rendered by default.

74 changes: 37 additions & 37 deletions public/scripts/common.js

Large diffs are not rendered by default.

0 comments on commit 0a0e3d0

Please sign in to comment.