Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 49d8ac1

Browse files
authored
Merge pull request #38 from veshu/develop
fix for #37
2 parents a9f7265 + 3872f5b commit 49d8ac1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/front/src/app/upsertproject/upsertproject.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h2>{{title}}</h2>
3737
<input class="form-control" type="url" ng-model="project.repoUrl" required />
3838
<span ng-show="projectForm.project.repoUrl.$touched && projectForm.project.repoUrl.$invalid">The TC Repo URL is required.</span>
3939
<br />
40-
<div class="hide">
40+
<div class="hide" *ng-if="true">
4141
<label class="form-label">Rocket.chat Webhook URL:</label>
4242
<input class="form-control" type="url" ng-model="project.rocketChatWebhook"/>
4343
<span ng-show="projectForm.project.rocketChatWebhook.$touched && projectForm.project.rocketChatWebhook.$invalid">The Rocket Chat Webhook is required.</span>
@@ -52,7 +52,7 @@ <h2>{{title}}</h2>
5252
ng-model="project.archived" ng-true-value="'true'" ng-false-value="'false'" />
5353
<br/>
5454

55-
<button class="with-button btn btn-sm btn-info" ng-click="projectForm.$valid && save()">
55+
<button type="submit" class="with-button btn btn-sm btn-info" ng-click="projectForm.$valid && save()">
5656
<strong>
5757
Save
5858
</strong>

src/services/ProjectService.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ async function createLabel(body, currentUserTopcoderHandle) {
142142
let index = 1;
143143
const repoName = results[results.length - index];
144144
index += 1;
145-
const repoOwner = results[results.length - index];
145+
const excludePart = 3;
146+
const repoOwner = _(results).slice(excludePart, results.length - 1).join('/');
146147
if (provider === 'github') {
147148
try {
148149
const client = gitHubApi.client(copilot.accessToken);
@@ -212,7 +213,8 @@ async function createHook(body, currentUserTopcoderHandle) {
212213
let index = 1;
213214
const repoName = results[results.length - index];
214215
index += 1;
215-
const repoOwner = results[results.length - index];
216+
const excludePart = 3;
217+
const repoOwner = _(results).slice(excludePart, results.length - 1).join('/');
216218
if (provider === 'github') {
217219
try {
218220
const client = gitHubApi.client(copilot.accessToken);

0 commit comments

Comments
 (0)