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 * as React from 'react'; | |
import { AadHttpClient, AadHttpClientFactory } from "@microsoft/sp-http"; | |
import { APP_ID } from './constants'; | |
export const useAzureFunctions = (aadHttpClientFactory: AadHttpClientFactory) => { | |
const clientRef = React.useRef<AadHttpClient>(); | |
const getClient = React.useCallback(async () => { | |
if (!aadHttpClientFactory) { | |
return 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
name: "On pull request" | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
create-task: | |
runs-on: ubuntu-latest | |
steps: |
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
# A script to get summary of a SharePoint site page using GPT-3.5 turbo | |
# The script accepts the following parameters: | |
# SiteAbsoluteUrl, PageName | |
Param( | |
[Parameter(Mandatory = $true)] | |
[string]$SiteAbsoluteUrl, | |
[Parameter(Mandatory = $true)] | |
[string]$PageName | |
) |
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
# For better pipelines see - https://www.voitanos.io/blog/sharepoint-framework-azure-pipelines-templates/ | |
parameters: | |
- name: sppkg_file_name | |
type: string | |
default: name_of_the_package.sppkg | |
- name: site_url | |
type: string | |
default: https://contoso.sharepoint.com/sites/teamsite | |
- name: tenant_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
name: SPFx CICD with PnP PowerShell OIDC | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
permissions: | |
id-token: write |
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
<!-- Example --> | |
//const time = showTimeUsingTemporal ? | |
//await this.getOfficeLocalTimeUsingTemporal(officeTimeZoneId) : | |
//await this.getOfficeLocalTimeUsingLuxon(officeTimeZoneId); | |
<!-- Output --> | |
<!-- officeTimeZoneId = 'Asia/Kolkata' --> | |
//🕙 14:32 (4h 30m ahead of you) | |
<!-- officeTimeZoneId = 'Europe/London' --> |
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
//* Helper wrapper for calling Graph | |
//* based on https://gist.github.com/wobba/37416d3107b85675d896105554b3df28 | |
//* Thank you Mikael Svenson | |
import { WebPartContext } from '@microsoft/sp-webpart-base'; | |
import { GraphError } from '@microsoft/microsoft-graph-client'; | |
import { MSGraphClientV3 } from '@microsoft/sp-http'; | |
export class msgraph { | |
private static _graphClient: MSGraphClientV3; |
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
{ | |
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", | |
"elmType": "div", | |
"style": { | |
"flex-directon": "row", | |
"justify-content": "left", | |
"align-items": "center", | |
"flex-wrap": "nowrap" | |
}, | |
"children": [ |
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 * as github from '@actions/github'; | |
... | |
... | |
const octokit = github.getOctokit(githubToken); | |
... | |
... | |
const opts = octokit.rest.issues.listForRepo.endpoint.merge({ | |
...context.issue, | |
state: filterState, | |
labels: filterLabel |
NewerOlder