Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CS699-Project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Meet Narendra
CS699-Project
Commits
cd8cb6a7
Commit
cd8cb6a7
authored
Nov 20, 2022
by
Meet Narendra
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Frontend ese1
parent
39bcf6d8
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
218 additions
and
33 deletions
+218
-33
frontend/sitcomm/src/app/app.module.ts
frontend/sitcomm/src/app/app.module.ts
+7
-1
frontend/sitcomm/src/app/confluence/confluence.component.ts
frontend/sitcomm/src/app/confluence/confluence.component.ts
+5
-2
frontend/sitcomm/src/app/fetcher.service.spec.ts
frontend/sitcomm/src/app/fetcher.service.spec.ts
+16
-0
frontend/sitcomm/src/app/fetcher.service.ts
frontend/sitcomm/src/app/fetcher.service.ts
+16
-0
frontend/sitcomm/src/app/github/github.component.html
frontend/sitcomm/src/app/github/github.component.html
+1
-1
frontend/sitcomm/src/app/github/github.component.ts
frontend/sitcomm/src/app/github/github.component.ts
+33
-3
frontend/sitcomm/src/app/home/home.component.html
frontend/sitcomm/src/app/home/home.component.html
+1
-1
frontend/sitcomm/src/app/jira/jira.component.ts
frontend/sitcomm/src/app/jira/jira.component.ts
+5
-2
frontend/sitcomm/src/app/profile/profile.component.css
frontend/sitcomm/src/app/profile/profile.component.css
+12
-1
frontend/sitcomm/src/app/profile/profile.component.html
frontend/sitcomm/src/app/profile/profile.component.html
+45
-13
frontend/sitcomm/src/app/profile/profile.component.ts
frontend/sitcomm/src/app/profile/profile.component.ts
+7
-2
frontend/sitcomm/src/app/project/project.component.html
frontend/sitcomm/src/app/project/project.component.html
+6
-3
frontend/sitcomm/src/app/project/project.component.ts
frontend/sitcomm/src/app/project/project.component.ts
+11
-1
frontend/sitcomm/src/app/slack/slack.component.ts
frontend/sitcomm/src/app/slack/slack.component.ts
+5
-2
sitcomm/api/views.py
sitcomm/api/views.py
+13
-0
sitcomm/conf.py
sitcomm/conf.py
+21
-0
sitcomm/github/models.py
sitcomm/github/models.py
+2
-1
sitcomm/jira/Pipfile
sitcomm/jira/Pipfile
+12
-0
No files found.
frontend/sitcomm/src/app/app.module.ts
View file @
cd8cb6a7
...
@@ -23,6 +23,10 @@ import { JiraComponent } from './jira/jira.component';
...
@@ -23,6 +23,10 @@ import { JiraComponent } from './jira/jira.component';
import
{
ConfluenceComponent
}
from
'
./confluence/confluence.component
'
;
import
{
ConfluenceComponent
}
from
'
./confluence/confluence.component
'
;
import
{
ProjectComponent
}
from
'
./project/project.component
'
;
import
{
ProjectComponent
}
from
'
./project/project.component
'
;
import
{
MatTab
,
MatTabsModule
}
from
'
@angular/material/tabs
'
;
import
{
MatTab
,
MatTabsModule
}
from
'
@angular/material/tabs
'
;
import
{
MatStepperModule
}
from
'
@angular/material/stepper
'
;
import
{
MatListModule
}
from
'
@angular/material/list
'
;
@
NgModule
({
@
NgModule
({
declarations
:
[
declarations
:
[
AppComponent
,
AppComponent
,
...
@@ -49,7 +53,9 @@ import { MatTab, MatTabsModule } from '@angular/material/tabs';
...
@@ -49,7 +53,9 @@ import { MatTab, MatTabsModule } from '@angular/material/tabs';
MatSidenavModule
,
MatSidenavModule
,
MatGridListModule
,
MatGridListModule
,
MatCardModule
,
MatCardModule
,
MatTabsModule
MatTabsModule
,
MatStepperModule
,
MatListModule
],
],
providers
:
[
CookieService
],
providers
:
[
CookieService
],
bootstrap
:
[
AppComponent
]
bootstrap
:
[
AppComponent
]
...
...
frontend/sitcomm/src/app/confluence/confluence.component.ts
View file @
cd8cb6a7
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Observable
,
Observer
}
from
'
rxjs
'
;
import
{
FetcherService
}
from
'
../fetcher.service
'
;
@
Component
({
@
Component
({
selector
:
'
app-confluence
'
,
selector
:
'
app-confluence
'
,
...
@@ -6,10 +8,11 @@ import { Component, OnInit } from '@angular/core';
...
@@ -6,10 +8,11 @@ import { Component, OnInit } from '@angular/core';
styleUrls
:
[
'
./confluence.component.css
'
]
styleUrls
:
[
'
./confluence.component.css
'
]
})
})
export
class
ConfluenceComponent
implements
OnInit
{
export
class
ConfluenceComponent
implements
OnInit
{
projectId
=
NaN
;
constructor
()
{
}
constructor
(
private
fetcherService
:
FetcherService
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
projectId
=
this
.
fetcherService
.
getCurrentProjectId
();
}
}
}
}
frontend/sitcomm/src/app/fetcher.service.spec.ts
0 → 100644
View file @
cd8cb6a7
import
{
TestBed
}
from
'
@angular/core/testing
'
;
import
{
FetcherService
}
from
'
./fetcher.service
'
;
describe
(
'
FetcherService
'
,
()
=>
{
let
service
:
FetcherService
;
beforeEach
(()
=>
{
TestBed
.
configureTestingModule
({});
service
=
TestBed
.
inject
(
FetcherService
);
});
it
(
'
should be created
'
,
()
=>
{
expect
(
service
).
toBeTruthy
();
});
});
frontend/sitcomm/src/app/fetcher.service.ts
0 → 100644
View file @
cd8cb6a7
import
{
Injectable
}
from
'
@angular/core
'
;
@
Injectable
({
providedIn
:
'
root
'
})
export
class
FetcherService
{
currentProjectId
=
NaN
;
getCurrentProjectId
()
{
return
this
.
currentProjectId
;
}
setCurrentProjectId
(
id
:
number
)
{
this
.
currentProjectId
=
id
;
}
constructor
()
{
}
}
frontend/sitcomm/src/app/github/github.component.html
View file @
cd8cb6a7
<p>
github works!
</p>
frontend/sitcomm/src/app/github/github.component.ts
View file @
cd8cb6a7
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Observable
,
Observer
}
from
'
rxjs
'
;
import
{
FetcherService
}
from
'
../fetcher.service
'
;
export
interface
entry
{
id
:
number
;
name
:
string
;
commitMessage
:
string
;
commitDate
:
string
;
type
:
string
;
url
:
string
;
}
@
Component
({
@
Component
({
selector
:
'
app-github
'
,
selector
:
'
app-github
'
,
...
@@ -6,10 +18,28 @@ import { Component, OnInit } from '@angular/core';
...
@@ -6,10 +18,28 @@ import { Component, OnInit } from '@angular/core';
styleUrls
:
[
'
./github.component.css
'
]
styleUrls
:
[
'
./github.component.css
'
]
})
})
export
class
GithubComponent
implements
OnInit
{
export
class
GithubComponent
implements
OnInit
{
projectId
=
NaN
;
constructor
()
{
}
constructor
(
private
fetcherService
:
FetcherService
)
{
}
fetchData
(
id
:
number
)
{
//return dummy data of type entry
return
[
{
id
:
1
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
folder
"
,
url
:
"
test
"
},
{
id
:
2
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
folder
"
,
url
:
"
test
"
},
{
id
:
3
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
folder
"
,
url
:
"
test
"
},
{
id
:
4
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
folder
"
,
url
:
"
test
"
},
{
id
:
5
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
folder
"
,
url
:
"
test
"
},
{
id
:
1
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
file
"
,
url
:
"
test
"
},
{
id
:
2
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
file
"
,
url
:
"
test
"
},
{
id
:
3
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
file
"
,
url
:
"
test
"
},
{
id
:
4
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
file
"
,
url
:
"
test
"
},
{
id
:
5
,
name
:
"
test
"
,
commitMessage
:
"
test
"
,
commitDate
:
"
test
"
,
type
:
"
file
"
,
url
:
"
test
"
},
]
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
projectId
=
this
.
fetcherService
.
getCurrentProjectId
();
console
.
log
(
this
.
projectId
);
}
}
}
}
\ No newline at end of file
frontend/sitcomm/src/app/home/home.component.html
View file @
cd8cb6a7
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<button
mat-icon-button
class=
"example-icon"
(click)=
"drawer.toggle()"
aria-label=
""
>
<button
mat-icon-button
class=
"example-icon"
(click)=
"drawer.toggle()"
aria-label=
""
>
<mat-icon>
menu
</mat-icon>
<mat-icon>
menu
</mat-icon>
</button>
</button>
<span>
Projects
</span>
<span>
Home
</span>
<span
class=
"example-spacer"
></span>
<span
class=
"example-spacer"
></span>
</div>
</div>
<div
class=
"flex-item"
>
<div
class=
"flex-item"
>
...
...
frontend/sitcomm/src/app/jira/jira.component.ts
View file @
cd8cb6a7
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Observable
,
Observer
}
from
'
rxjs
'
;
import
{
FetcherService
}
from
'
../fetcher.service
'
;
@
Component
({
@
Component
({
selector
:
'
app-jira
'
,
selector
:
'
app-jira
'
,
...
@@ -6,10 +8,11 @@ import { Component, OnInit } from '@angular/core';
...
@@ -6,10 +8,11 @@ import { Component, OnInit } from '@angular/core';
styleUrls
:
[
'
./jira.component.css
'
]
styleUrls
:
[
'
./jira.component.css
'
]
})
})
export
class
JiraComponent
implements
OnInit
{
export
class
JiraComponent
implements
OnInit
{
projectId
=
NaN
;
constructor
()
{
}
constructor
(
private
fetcherService
:
FetcherService
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
projectId
=
this
.
fetcherService
.
getCurrentProjectId
();
}
}
}
}
frontend/sitcomm/src/app/profile/profile.component.css
View file @
cd8cb6a7
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
}
}
.example-header-image
{
.example-header-image
{
background-image
:
url('https://
material.angular.io/assets/img/examples/shiba1.jp
g')
;
background-image
:
url('https://
cdn.pixabay.com/photo/2017/01/10/03/54/avatar-1968236_960_720.pn
g')
;
background-size
:
cover
;
background-size
:
cover
;
}
}
#nav
{
#nav
{
...
@@ -33,4 +33,15 @@
...
@@ -33,4 +33,15 @@
width
:
85%
;
width
:
85%
;
height
:
85%
;
height
:
85%
;
background-color
:
snow
;
background-color
:
snow
;
}
#profile-comp
{
display
:
flex
;
justify-content
:
space-around
;
}
.example-input-wrapper
{
margin-bottom
:
16px
;
}
label
{
margin-right
:
4px
;
}
}
\ No newline at end of file
frontend/sitcomm/src/app/profile/profile.component.html
View file @
cd8cb6a7
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<button
mat-icon-button
class=
"example-icon"
(click)=
"drawer.toggle()"
aria-label=
""
>
<button
mat-icon-button
class=
"example-icon"
(click)=
"drawer.toggle()"
aria-label=
""
>
<mat-icon>
menu
</mat-icon>
<mat-icon>
menu
</mat-icon>
</button>
</button>
<span>
Pro
jects
</span>
<span>
Pro
file
</span>
<span
class=
"example-spacer"
></span>
<span
class=
"example-spacer"
></span>
</div>
</div>
<div
class=
"flex-item"
>
<div
class=
"flex-item"
>
...
@@ -43,24 +43,56 @@
...
@@ -43,24 +43,56 @@
</div>
</div>
</mat-toolbar>
</mat-toolbar>
</p>
</p>
<div>
<div
id=
"profile-comp"
class=
"flex-container row"
>
<mat-card
class=
"example-card"
>
<mat-card
class=
"example-card
flex-item
"
>
<mat-card-header>
<mat-card-header>
<div
mat-card-avatar
class=
"example-header-image"
></div>
<div
mat-card-avatar
class=
"example-header-image"
></div>
<mat-card-title>
Shiba Inu
</mat-card-title>
<mat-card-title>
First Name Last Name
</mat-card-title>
<mat-card-subtitle>
Dog Breed
</mat-card-subtitle>
<mat-card-subtitle>
Employee Designation
</mat-card-subtitle>
</mat-card-header>
</mat-card-header>
<img
mat-card-image
src=
"https://material.angular.io/assets/img/examples/shiba2.jpg"
alt=
"Photo of a Shiba Inu"
>
<img
mat-card-image
src=
"https://material.angular.io/assets/img/examples/shiba2.jpg"
alt=
"Photo of a Shiba Inu"
>
<mat-card-content>
<mat-card-content>
<p>
<p>
The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan.
Some catchy bio.
A small, agile dog that copes very well with mountainous terrain, the Shiba Inu was originally
bred for hunting.
</p>
</p>
</mat-card-content>
</mat-card-content>
<mat-card-actions>
<mat-card-actions>
<button
mat-button
>
Edit Profile
</button>
<button
mat-button
>
Edit Profile
</button>
</mat-card-actions>
</mat-card-actions>
</mat-card>
</mat-card>
<mat-vertical-stepper
[linear]=
"false"
#stepper
>
<mat-step
[stepControl]=
"firstFormGroup"
>
<form
[formGroup]=
"firstFormGroup"
>
<ng-template
matStepLabel
>
Fill out your name
</ng-template>
<mat-form-field>
<input
matInput
placeholder=
"Last name, First name"
formControlName=
"firstCtrl"
required
>
</mat-form-field>
<div>
<button
mat-button
matStepperNext
>
Next
</button>
</div>
</form>
</mat-step>
<mat-step
[stepControl]=
"secondFormGroup"
>
<form
[formGroup]=
"secondFormGroup"
>
<ng-template
matStepLabel
>
Fill out your address
</ng-template>
<mat-form-field>
<input
matInput
placeholder=
"Address"
formControlName=
"secondCtrl"
required
>
</mat-form-field>
<div>
<button
mat-button
matStepperPrevious
>
Back
</button>
<button
mat-button
matStepperNext
>
Next
</button>
</div>
</form>
</mat-step>
<mat-step>
<ng-template
matStepLabel
>
Done
</ng-template>
You are now done.
<div>
<button
mat-button
matStepperPrevious
>
Back
</button>
<button
mat-button
(click)=
"stepper.reset()"
>
Reset
</button>
</div>
</mat-step>
</mat-vertical-stepper>
</div>
</div>
</mat-drawer-container>
</mat-drawer-container>
frontend/sitcomm/src/app/profile/profile.component.ts
View file @
cd8cb6a7
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
CookieService
}
from
'
ngx-cookie-service
'
;
import
{
CookieService
}
from
'
ngx-cookie-service
'
;
import
{
FormBuilder
,
FormGroup
}
from
'
@angular/forms
'
;
@
Component
({
@
Component
({
selector
:
'
app-profile
'
,
selector
:
'
app-profile
'
,
...
@@ -7,8 +8,12 @@ import { CookieService } from 'ngx-cookie-service';
...
@@ -7,8 +8,12 @@ import { CookieService } from 'ngx-cookie-service';
styleUrls
:
[
'
./profile.component.css
'
]
styleUrls
:
[
'
./profile.component.css
'
]
})
})
export
class
ProfileComponent
implements
OnInit
{
export
class
ProfileComponent
implements
OnInit
{
firstFormGroup
:
FormGroup
;
constructor
(
private
cookieService
:
CookieService
)
{
}
secondFormGroup
:
FormGroup
;
constructor
(
private
cookieService
:
CookieService
,
private
_formBuilder
:
FormBuilder
)
{
this
.
firstFormGroup
=
this
.
_formBuilder
.
group
({
firstCtrl
:
[
''
]});
this
.
secondFormGroup
=
this
.
_formBuilder
.
group
({
secondCtrl
:
[
''
]});
}
ngOnInit
():
void
{
ngOnInit
():
void
{
}
}
...
...
frontend/sitcomm/src/app/project/project.component.html
View file @
cd8cb6a7
...
@@ -46,10 +46,13 @@
...
@@ -46,10 +46,13 @@
Loading tabs...
Loading tabs...
</ng-container>
</ng-container>
<mat-tab-group
mat-align-tabs=
"center"
>
<mat-tab-group
mat-align-tabs=
"center"
selectedIndex=
"1"
(selectedTabChange)=
"changeTab($event)"
>
<mat-tab
*ngFor=
"let tab of asyncTabs | async"
>
<mat-tab
*ngFor=
"let tab of asyncTabs | async"
>
<ng-template
mat-tab-label
>
{{tab.label}}
</ng-template>
<ng-template
mat-tab-label
>
{{tab.label}}
</ng-template>
{{tab.content}}
<app-github
*ngIf=
"tabInd===1"
routerLink=
"['']"
[state]=
"{id:id,name:name}"
></app-github>
<app-jira
*ngIf=
"tabInd===3"
></app-jira>
<app-confluence
*ngIf=
"tabInd===2"
></app-confluence>
<app-slack
*ngIf=
"tabInd===4"
></app-slack>
</mat-tab>
</mat-tab>
</mat-tab-group>
</mat-tab-group>
</p>
</p>
...
...
frontend/sitcomm/src/app/project/project.component.ts
View file @
cd8cb6a7
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
Observable
,
Observer
}
from
'
rxjs
'
;
import
{
Observable
,
Observer
}
from
'
rxjs
'
;
import
{
GithubComponent
}
from
'
../github/github.component
'
;
import
{
JiraComponent
}
from
'
../jira/jira.component
'
;
import
{
SlackComponent
}
from
'
../slack/slack.component
'
;
import
{
ConfluenceComponent
}
from
'
../confluence/confluence.component
'
;
import
{
FetcherService
}
from
'
../fetcher.service
'
;
export
interface
ExampleTab
{
export
interface
ExampleTab
{
label
:
string
;
label
:
string
;
content
:
string
;
content
:
string
;
...
@@ -14,8 +19,9 @@ export interface ExampleTab {
...
@@ -14,8 +19,9 @@ export interface ExampleTab {
export
class
ProjectComponent
implements
OnInit
{
export
class
ProjectComponent
implements
OnInit
{
id
:
number
;
id
:
number
;
name
:
string
;
name
:
string
;
tabInd
=
1
;
asyncTabs
:
Observable
<
ExampleTab
[]
>
;
asyncTabs
:
Observable
<
ExampleTab
[]
>
;
constructor
()
{
constructor
(
private
fetcherService
:
FetcherService
)
{
console
.
log
(
window
.
history
.
state
);
console
.
log
(
window
.
history
.
state
);
this
.
id
=
window
.
history
.
state
.
id
;
this
.
id
=
window
.
history
.
state
.
id
;
this
.
name
=
window
.
history
.
state
.
name
;
this
.
name
=
window
.
history
.
state
.
name
;
...
@@ -30,7 +36,11 @@ export class ProjectComponent implements OnInit {
...
@@ -30,7 +36,11 @@ export class ProjectComponent implements OnInit {
},
1000
);
},
1000
);
});
});
}
}
changeTab
(
event
:
any
)
{
this
.
tabInd
=
event
.
index
+
1
;
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
fetcherService
.
setCurrentProjectId
(
this
.
id
);
}
}
}
}
frontend/sitcomm/src/app/slack/slack.component.ts
View file @
cd8cb6a7
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Observable
,
Observer
}
from
'
rxjs
'
;
import
{
FetcherService
}
from
'
../fetcher.service
'
;
@
Component
({
@
Component
({
selector
:
'
app-slack
'
,
selector
:
'
app-slack
'
,
...
@@ -6,10 +8,11 @@ import { Component, OnInit } from '@angular/core';
...
@@ -6,10 +8,11 @@ import { Component, OnInit } from '@angular/core';
styleUrls
:
[
'
./slack.component.css
'
]
styleUrls
:
[
'
./slack.component.css
'
]
})
})
export
class
SlackComponent
implements
OnInit
{
export
class
SlackComponent
implements
OnInit
{
projectId
=
NaN
;
constructor
()
{
}
constructor
(
private
fetcherService
:
FetcherService
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
projectId
=
this
.
fetcherService
.
getCurrentProjectId
();
}
}
}
}
sitcomm/api/views.py
View file @
cd8cb6a7
...
@@ -4,6 +4,7 @@ from .models import *
...
@@ -4,6 +4,7 @@ from .models import *
from
.serializers
import
*
from
.serializers
import
*
from
rest_framework
import
viewsets
,
views
from
rest_framework
import
viewsets
,
views
from
rest_framework.response
import
Response
from
rest_framework.response
import
Response
#from sitcomm.conf import *
class
UserViewSet
(
viewsets
.
ModelViewSet
):
class
UserViewSet
(
viewsets
.
ModelViewSet
):
queryset
=
Users
.
objects
.
all
()
queryset
=
Users
.
objects
.
all
()
...
@@ -48,5 +49,17 @@ class registerViewSet(views.APIView):
...
@@ -48,5 +49,17 @@ class registerViewSet(views.APIView):
try
:
try
:
user
=
Users
.
objects
.
create
(
email
=
email
,
password
=
password
,
role
=
role
,
active
=
True
)
user
=
Users
.
objects
.
create
(
email
=
email
,
password
=
password
,
role
=
role
,
active
=
True
)
return
Response
({
'uid'
:
user
.
uid
,
'status'
:
True
})
return
Response
({
'uid'
:
user
.
uid
,
'status'
:
True
})
except
:
return
Response
({
'status'
:
False
})
class
getReposViewSet
(
views
.
APIView
):
def
get
(
self
,
request
):
uid
=
request
.
GET
.
get
(
'uid'
)
try
:
user
=
Users
.
objects
.
get
(
uid
=
uid
)
if
user
is
None
:
return
Response
({
'status'
:
False
})
repos
=
Projects
.
objects
.
filter
(
uid
=
user
)
return
Response
({
'repos'
:
repos
,
'status'
:
True
})
except
:
except
:
return
Response
({
'status'
:
False
})
return
Response
({
'status'
:
False
})
\ No newline at end of file
sitcomm/conf.py
0 → 100644
View file @
cd8cb6a7
#CONSTANTS FILE
GITHUB_TOKEN
=
"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"
GITHUB_GET_REPOS_URL
=
f
'curl
\
-H "Accept: application/vnd.github+json"
\
-H "Authorization: Bearer {GITHUB_TOKEN}"
\
https://api.github.com/users/USERID/repos'
GITHUB_GET_REPO_URL
=
f
'curl
\
-H "Accept: application/vnd.github+json"
\
-H "Authorization: Bearer {GITHUB_TOKEN}"
\
https://api.github.com/repos/USERID/REPONAME'
GITHUB_GET_REPO_FILES_URL
=
f
'curl
\
-H "Accept: application/vnd.github+json"
\
-H "Authorization: Bearer {GITHUB_TOKEN}"
\
https://api.github.com/repos/USERID/REPONAME/contents/'
GITHUB_GET_REPO_FILE_URL
=
f
'curl
\
-H "Accept: application/vnd.github+json"
\
-H "Authorization: Bearer {GITHUB_TOKEN}"
\
https://api.github.com/repos/USERID/REPONAME/contents/FILENAME'
\ No newline at end of file
sitcomm/github/models.py
View file @
cd8cb6a7
from
django.db
import
models
from
django.db
import
models
from
home.models
import
*
# Create your models here.
# Create your models here.
sitcomm/jira/Pipfile
0 → 100644
View file @
cd8cb6a7
[[source]]
url
=
"https://pypi.org/simple"
verify_ssl
=
true
name
=
"pypi"
[packages]
django
=
"*"
[dev-packages]
[requires]
python_version
=
"3.10"
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