зеркало из
1
0
Форкнуть 0
This commit is contained in:
Jeff Wilcox 2022-10-07 05:31:29 +00:00
Родитель d5f9110954
Коммит f892e1d3b6
9 изменённых файлов: 21 добавлений и 18 удалений

Просмотреть файл

@ -464,7 +464,7 @@ async function sendEmail(req: IReposAppRequestWithCreateResponse, logic: ICustom
console.warn(err);
}
const mail = {
to: [...emails, ...additionalViewProperties?.to],
to: [...emails, ...(additionalViewProperties?.to ? additionalViewProperties.to : [])],
cc: additionalViewProperties?.cc,
bcc: additionalViewProperties?.bcc,
subject,

Просмотреть файл

@ -425,7 +425,7 @@ export class Account {
let error: IReposError = null;
const operations = throwIfNotGitHubCapable(this._operations);
const opsWithProvs = operationsWithCapability<IOperationsProviders>(operations, CoreCapability.Providers);
const { queryCache } = opsWithProvs?.providers;
const { queryCache } = opsWithProvs?.providers || {};
if (!queryCache || !queryCache.supportsRepositoryCollaborators) {
history.push('The account may still have Collaborator permissions to repositories');
return { history };

Просмотреть файл

@ -2,10 +2,10 @@
// Copyright (c) Microsoft.
//
const path = require('path');
const pug = require('pug');
import path from 'path';
import pug from 'pug';
export default function RenderHtmlMail(basedir, viewName, options, config): Promise<string> {
export default function RenderHtmlMail(basedir: string, viewName: string, options, config): Promise<string> {
return new Promise((resolve, reject) => {
return renderMailHtml(basedir, viewName, options, config, (error, html) => {
return error ? reject(error) : resolve(html);
@ -13,7 +13,7 @@ export default function RenderHtmlMail(basedir, viewName, options, config): Prom
});
}
function renderMailHtml(basedir, viewName, options, config, callback) {
function renderMailHtml(basedir: string, viewName: string, options, config, callback) {
options = options || {};
if (!viewName) {
viewName = 'email';

Просмотреть файл

@ -13,8 +13,8 @@ export default class SmtpMailService implements IMailProvider {
html: true;
info: 'SMTP mail service';
constructor(config: any) {
this._config = config;
constructor(mailConfig: any) {
this._config = mailConfig;
}
getSentMessages() {

Просмотреть файл

@ -93,8 +93,8 @@ export function getAadApiConfiguration(config: any) {
const approvedAppsToReadMaintainers = Array.isArray(approvedApps?.scopes?.read?.maintainers) ? approvedApps?.scopes?.read?.maintainers : (approvedApps?.scopes?.read?.maintainers?.split ? [...approvedApps.scopes.read.maintainers.split(',')] : []);
const approvedAppsToReadJitConfirms = Array.isArray(approvedApps?.scopes?.read?.['jit/confirm']) ? approvedApps?.scopes?.read?.['jit/confirm'] : (approvedApps?.scopes?.read?.['jit/confirm']?.split ? [...approvedApps.scopes.read['jit/confirm'].split(',')] : []);
const approvedOidsToCreateRepos = Array.isArray(approvedOids?.scopes?.create?.repos) ? approvedOids?.scopes?.create?.repos : (approvedOids?.scopes?.create?.repos?.split ? [...approvedOids?.scopes?.create?.repos?.split(',')] : []);
const approvedOidsToReadLinks = Array.isArray(approvedOids?.scopes?.read?.links) ? approvedOids?.scopes?.read?.links : (approvedOids?.scopes?.read?.links?.split ? [...approvedOids?.scopes?.read?.links.split(',')] : []);
const approvedOidsToCreateRepos = Array.isArray(approvedOids?.scopes?.create?.repos) ? approvedOids?.scopes?.create?.repos : (approvedOids?.scopes?.create?.repos?.split ? [...(approvedOids?.scopes?.create?.repos ? approvedOids.scopes.create.repos.split(',') : [])] : []);
const approvedOidsToReadLinks = Array.isArray(approvedOids?.scopes?.read?.links) ? approvedOids?.scopes?.read?.links : (approvedOids?.scopes?.read?.links?.split ? [...(approvedOids?.scopes?.read?.links ? approvedOids.scopes.read.links.split(',') : [])] : []);
const approvedOidsToReadJitConfirms = Array.isArray(approvedOids?.scopes?.read?.['jit/confirm']) ? approvedOids?.scopes?.read?.['jit/confirm'] : (approvedOids?.scopes?.read?.['jit/confirm']?.split ? [...approvedOids.scopes.read['jit/confirm'].split(',')] : []);
const oids = [

Просмотреть файл

@ -40,7 +40,7 @@
tr
td
p.footer
| #{companyName} Open Source Programs Office
| #{companyName}
br
a(href=config.urls.explore) Explore
| &nbsp;&bull;&nbsp;
@ -50,4 +50,3 @@
td(width='120', valign='middle')
img(align='right', valign='middle', src=config.brand.companyLogoSrc, width='108', alt=companyName)

Просмотреть файл

@ -6,8 +6,8 @@ table(style='width:100%;border:0', cellspacing=0, cellpadding=0)
tbody
tr
td(width=orgIdSize, height=orgIdSize)
img(src=logo, width=orgIdSize, height=orgIdSize, alt=config.brand.companyName + 'Open Source')
img(src=logo, width=orgIdSize, height=orgIdSize, alt=config.brand.companyName)
td(valign='bottom', nowrap='nowrap')
h2(style='vertical-align:bottom')
| &nbsp;
= app || config.brand.companyName + 'Open Source'
= app || config.brand.companyName

Просмотреть файл

@ -120,7 +120,7 @@ block content
if lockdownMailContent.repository && lockdownMailContent.repository.fork
h3 FORK
p This repository was forked. A fork into an official #{config.brand.companyName} organization is a very big deal and can cause confusion with the upstream open source community. Please verify that the individual creating this repo intends for their business to maintain this new forked open source community. If this is just a fork to contribute, engineers should contribute from their own individual account fork.
p This repository was forked. A fork into an official {config.brand.companyName} organization is a very big deal and can cause confusion with the upstream open source community. Please verify that the individual creating this repo intends for their business to maintain this new forked open source community. If this is just a fork to contribute, engineers should contribute from their own individual account fork.
if isForkAdministratorLocked
h4 For operations use

Просмотреть файл

@ -29,10 +29,14 @@ block content
| Do not remove any copyright headers or license information. Do not change the license from the forked project without the permission of #[a(href='mailto:OSSStandardsLegal@service.microsoft.com') the open source legal team].
li
strong Modifications.
| If you are modifying the project, follow our #[a(href=config.urls.docs) register] workflow for business/CELA approval.
//- This is a temporary integration to work with differences with the open source upstream
if config.brand.companyName === 'Microsoft'
| If you are modifying the project, follow our #[a(href=config.urls.docs) register] guidance for approval.
else
| If you are modifying the project, follow our #[a(href='https://docs.opensource.microsoft.com/content/index.html') register] workflow for business/CELA approval.
li
strong Making a Fork #{config.brand.companyName}'s.
| If you are making a "hard" fork that you plan on supporting as its own #{config.brand.companyName} project, follow our #[a(href=config.urls.release) release] workflow for business/CELA approval.
strong Making a company fork
| If you are making a "hard" fork that you plan on supporting as its own #{config.brand.companyName} project, follow our #[a(href=config.urls.release) release] workflow for approval.
ul: li
strong Note:
| the exception to this workflow for a fork is that the license must remain the same as the upstream fork. Contact #[a(href='mailto:OSSStandardsLegal@service.microsoft.com') the open source legal team] with questions.