Skip to content

Commit

Permalink
Merge branch 'dev' into feature/download-api-manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
thewahome authored Jun 26, 2023
2 parents 2bbdf44 + 9f7bcdf commit 737178c
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 35 deletions.
86 changes: 86 additions & 0 deletions .github/policies/microsoft-graph-explorer-v4-branch-protection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

# File initially created using https://github.com/MIchaelMainer/policyservicetoolkit/blob/main/branch_protection_export.ps1.

name: microsoft-graph-explorer-v4-branch-protection
description: Branch protection policy for the microsoft-graph-explorer-v4 repository
resource: repository
configuration:
branchProtectionRules:

- branchNamePattern: dev
# This branch pattern applies to the following branches as of 06/09/2023 14:08:40:
# dev

# Specifies whether this branch can be deleted. boolean
allowsDeletions: false
# Specifies whether forced pushes are allowed on this branch. boolean
allowsForcePushes: false
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
dismissStaleReviews: true
# Specifies whether admins can overwrite branch protection. boolean
isAdminEnforced: false
# Indicates whether "Require a pull request before merging" is enabled. boolean
requiresPullRequestBeforeMerging: true
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
requiredApprovingReviewsCount: 1
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
requireCodeOwnersReview: true
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
requiresCommitSignatures: false
# Are conversations required to be resolved before merging? boolean
requiresConversationResolution: true
# Are merge commits prohibited from being pushed to this branch. boolean
requiresLinearHistory: true
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
requiredStatusChecks:
- license/cla
- Build packages
- Test (1)
- Test (2)
- Test (3)
- Test (4)
- Test (5)
- Test (6)
- Lint
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
requiresStrictStatusChecks: true
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
restrictsPushes: false
# Restrict who can dismiss pull request reviews. boolean
restrictsReviewDismissals: false

- branchNamePattern: master
# This branch pattern applies to the following branches as of 06/09/2023 14:08:40:
# master

# Specifies whether this branch can be deleted. boolean
allowsDeletions: false
# Specifies whether forced pushes are allowed on this branch. boolean
allowsForcePushes: false
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
dismissStaleReviews: true
# Specifies whether admins can overwrite branch protection. boolean
isAdminEnforced: false
# Indicates whether "Require a pull request before merging" is enabled. boolean
requiresPullRequestBeforeMerging: true
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
requiredApprovingReviewsCount: 1
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
requireCodeOwnersReview: true
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
requiresCommitSignatures: false
# Are conversations required to be resolved before merging? boolean
requiresConversationResolution: false
# Are merge commits prohibited from being pushed to this branch. boolean
requiresLinearHistory: false
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
requiredStatusChecks:
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
requiresStrictStatusChecks: true
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
restrictsPushes: true
# Restrict who can dismiss pull request reviews. boolean
restrictsReviewDismissals: false

47 changes: 18 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@microsoft/microsoft-graph-client": "3.0.5",
"@monaco-editor/react": "4.5.0",
"@ms-ofb/officebrowserfeedbacknpm": "file:packages/officebrowserfeedbacknpm-1.6.6.tgz",
"adaptive-expressions": "4.19.3",
"adaptive-expressions": "4.20.0",
"adaptivecards": "2.11.1",
"adaptivecards-templating": "2.3.1",
"ajv": "8.12.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function createResourcesList(
paths: string[],
methods: Method[]
): IResourceLink[] {
const { segment, children } = parent;
const { segment, children, labels } = parent;
const links: IResourceLink[] = [];
const childPaths = Array.from(new Set([...paths, segment]));
if (methods.length > 1) {
Expand All @@ -49,7 +49,8 @@ export function createResourcesList(
},
segment,
childPaths,
method
method,
getLink(labels, version, method)
)
);
});
Expand Down Expand Up @@ -81,7 +82,8 @@ export function createResourcesList(
info: IResource,
parent: string,
paths: string[] = [],
method?: Method
method?: Method,
docLink?: string
): IResourceLink {
const { segment, labels } = info;
const level = paths.length;
Expand Down Expand Up @@ -110,7 +112,6 @@ export function createResourcesList(
? true
: false;

const docLink = getLink(labels, version, method);
const pathItems = Array.from(new Set([...paths, segment]));
const key = generateKey(method, pathItems, version);

Expand All @@ -126,7 +127,8 @@ export function createResourcesList(
method: method?.toUpperCase(),
type,
links: versionedChildren,
docLink
docLink: docLink ? docLink : getLink(labels, version, method)

};
}

Expand Down

0 comments on commit 737178c

Please sign in to comment.