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
{ | |
"name": "Debug in Outlook (Edge)", | |
"configurations": [ | |
"Attach to Frontend in Outlook (Edge)" | |
], | |
"preLaunchTask": "Start Teams App Locally", | |
"presentation": { | |
"group": "all", | |
"order": 3 | |
}, |
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
{ | |
"name": "Attach to Frontend in Outlook (Edge)", | |
"type": "pwa-msedge", | |
"request": "launch", | |
"url": "https://outlook.office.com/host/${local:teamsAppId}?${account-hint}", | |
"presentation": { | |
"group": "all", | |
"hidden": true | |
}, | |
"internalConsoleOptions": "neverOpen" |
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
import { Dashboard } from "../lib/Dashboard"; | |
import { DevOps } from "../widgets/DevOpsWidget"; | |
import { GithubIssues } from "../widgets/GitHubWidget"; | |
import { oneColumn } from "../lib/Dashboard.styles"; | |
export default class SampleDashboard extends Dashboard { | |
protected rowHeights(): string | undefined { | |
return "320px 400px"; | |
} | |
protected columnWidths(): string | undefined { |
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
import "../styles/GitHub.css"; | |
import { Button, Image, Text } from "@fluentui/react-components"; | |
import { Open16Regular } from "@fluentui/react-icons"; | |
import { githubIssuesModel } from "../../models/githubIssuesModel"; | |
import { getIssues } from "../../services/githubService"; | |
import { Widget } from "../lib/Widget"; | |
import { headerStyles, widgetStyles } from "../lib/Widget.styles"; | |
interface IIssueState { | |
issues?: githubIssuesModel[]; | |
} |
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
import { githubIssuesModel } from "../models/githubIssuesModel"; | |
import { Octokit } from "octokit"; | |
export async function getIssues(): Promise<githubIssuesModel[]> { | |
const octokit = new Octokit({ //github personal access token auth: "GITHUB_PERSONAL_ACCESS_TOKEN" }) | |
try { | |
const resp = await octokit.request('GET /repos/{owner}/{repo}/issues', { | |
//repository name and owner name | |
owner: "OWNER_NAME", | |
repo: "REPOSITORY_NAME" | |
}) |
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
npm install octokit |
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
import { CircleSmall20Filled } from "@fluentui/react-icons"; | |
import { DevOpsModel } from "../../models/devOpsModel"; | |
import { DevOpsWorkItems } from "../../services/devopsService"; | |
import { Widget } from "../lib/Widget"; | |
import { headerStyles } from "../lib/Widget.styles"; | |
interface IWorkItemState { | |
devOpsData?: DevOpsModel[]; | |
} | |
export class DevOps extends Widget<IWorkItemState> { |
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
const devopsValue = req["value"]; | |
for (const obj of devopsValue) | |
{ | |
const tmp: DevOpsModel = { | |
id: obj["id"], url: obj["url"], | |
fields: { | |
title: obj["fields"]["System.Title"], | |
workItemType: obj["fields"]["System.WorkItemType"], | |
assigendTo: { | |
displayName: obj["fields"]["System.AssignedTo"]["displayName"], |
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
import { DevOpsModel } from "../models/devOpsModel"; | |
export async function DevOpsWorkItems(): Promise<DevOpsModel[]> | |
{ | |
try | |
{ | |
let devopsItems: DevOpsModel[] = []; | |
const req = await fetch( "https://dev.azure.com/ORGANIZATION_NAME/PROJECT_NAME/_apis/wit/workitems?ids=1,2,3,4,5&api-version=7.0", | |
{ method: "GET", headers: { "Content-Type": "application/json; charset=utf-8;", Authorization: "Basic " + btoa("Basic" + ":" + "DEVOPS_PERSONAL_ACCESS_TOKEN"), }, }) | |
.then((response) => response.json()).then((req) => { return req; }); | |
return; |