-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Settings now asks for GitHub Sync 2. New service for GitHub tasks New Pages: Bugs Corrected: To Be Corrected: 0. On product delete, delete trace results 1. On product delete, delete flamegraph result
- Loading branch information
1 parent
432c9af
commit 6e2e288
Showing
9 changed files
with
118 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface GitSyncData { | ||
key: string; | ||
repo: string; | ||
branch: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { Injectable } from '@angular/core'; | ||
import {doc, Firestore, getDoc, setDoc} from "@angular/fire/firestore"; | ||
import {HttpClient} from "@angular/common/http"; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class GithubService { | ||
|
||
constructor( | ||
private firestore:Firestore, | ||
private httpClient:HttpClient | ||
) { } | ||
|
||
async syncRepo(orgName:string,gitKey: string, repoName: string, branchName: string) { | ||
const docRef = doc(this.firestore, 'teams', orgName); | ||
const docSnap = await getDoc(docRef); | ||
|
||
if (docSnap.exists()) { | ||
const data = docSnap.data(); | ||
data['gitHub'] = { | ||
key: gitKey, | ||
repo: repoName, | ||
branch: branchName | ||
} | ||
await setDoc(docRef, data); | ||
} | ||
} | ||
|
||
async getSyncRepo(orgName:string) { | ||
const docRef = doc(this.firestore, 'teams', orgName); | ||
const docSnap = await getDoc(docRef); | ||
|
||
if (docSnap.exists()) { | ||
const data = docSnap.data(); | ||
return data['gitHub']; | ||
} | ||
return null; | ||
} | ||
|
||
|
||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.