зеркало из
1
0
Форкнуть 0
This commit is contained in:
Nick Schonning 2022-10-09 23:02:44 -04:00
Родитель ef2425bd28
Коммит deea160f69
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 5DDAAD9C9AAFFD9F
36 изменённых файлов: 76 добавлений и 76 удалений

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

@ -27,7 +27,7 @@ Core capabilities and features of this application:
- **People inventory 👨‍🦳🧑‍🚀🧒🏽** to help people connect GitHub public logins with corporate identities
- **Intercepting forks and new repositories 🔐** to inject compliance and approval processes
- **Disable and enable 🔑** experiences for GitHub repositories
- **Just-in-time (JIT) access 🚪** for open source repositories, teams, and organizations, aligning with the principle of least privilege acccess
- **Just-in-time (JIT) access 🚪** for open source repositories, teams, and organizations, aligning with the principle of least privilege access
- **Sudo ⚡️** capabilities for repos, teams, organizations to remove persistent broad ownership and admin permissions
- **Hosting APIs 🍽️** to create repos, large-scale orgs to access link data, and reports
- **Background jobs 👷‍♂️** to maintain eventual consistency, run tasks, gather metrics, and prepare OKRs
@ -373,7 +373,7 @@ keep cached data around.
## Collaboration
This project began as a hackathon... so still has growing pains years later.
Since this is technicall a _backend web application_ and includes some
Since this is technically a _backend web application_ and includes some
server-generated user interface, the project was not originally designed
to be shared as something that runs out-of-the-box, but... it is possible.

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

@ -106,7 +106,7 @@ router.get(
// If the user forces a true refresh, force a true walk of all the teams
// from GitHub. This will be slow the larger the org. Allow a short cache
// window for the casewhere a webhook processes the change quickly.
// window for the case where a webhook processes the change quickly.
if (req.query.refresh) {
caching.backgroundRefresh = false;
caching.maxAgeSeconds = 10;

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

@ -517,11 +517,11 @@ async function sendEmail(
targetType = 'Transfer';
}
let managerInfo: ICachedEmployeeInformation = null;
if (operations.hasCapability(CoreCapability.Hiearchy) && approvalRequest.createdByCorporateId) {
if (operations.hasCapability(CoreCapability.Hierarchy) && approvalRequest.createdByCorporateId) {
try {
const opsHierarchy = operationsWithCapability<IOperationsHierarchy>(
operations,
CoreCapability.Hiearchy
CoreCapability.Hierarchy
);
managerInfo = await opsHierarchy.getCachedEmployeeManagementInformation(
approvalRequest.createdByCorporateId

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

@ -140,7 +140,7 @@ export class GraphManager {
const userTeamPermissions: TeamRepositoryPermission[] = [];
let bestPermission = null;
for (let j = 0; j < repo.teams.length; j++) {
const t = repo.teams[j]; // technicall a GET /repos/:owner/:repo/teams team permission response
const t = repo.teams[j]; // technically a GET /repos/:owner/:repo/teams team permission response
if (userTeams.has(t.id)) {
if (repo.private === false && t.permission === 'pull') {
// Public repos, ignore teams with pull access

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

@ -38,7 +38,7 @@ export async function isAuthorizedSystemAdministrator(
properties: {
eventName: `${insightsPrefix}SecurityGroupError`,
className: 'OperationsAdministration',
callName: 'isAuthorizedSytemAdministrator',
callName: 'isAuthorizedSystemAdministrator',
corporateId: corporateId,
securityGroupId: groupId,
},

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

@ -138,7 +138,7 @@ export class Operations
this.addCapability(CoreCapability.LockdownFeatureFlags);
this.addCapability(CoreCapability.GitHubCentralOperations);
this.addCapability(CoreCapability.RepositoryMetadataProvider);
this.addCapability(CoreCapability.Hiearchy);
this.addCapability(CoreCapability.Hierarchy);
this.addCapability(CoreCapability.Notifications);
const providers = options.providers;

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

@ -258,7 +258,7 @@ export class Organization {
try {
await this._getSpecificAuthorizationHeader(AppPurpose.Updates);
return true;
} catch (errror) {
} catch (error) {
return false;
}
}
@ -943,7 +943,7 @@ export class Organization {
'orgs.setMembershipForUser',
parameters
);
return ok as IOrganizationMembership; // state: pending or acive, role: admin or member
return ok as IOrganizationMembership; // state: pending or active, role: admin or member
}
async checkPublicMembership(username: string, options?: ICacheOptions): Promise<boolean> {

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

@ -6,7 +6,7 @@
"organizationsettings": "env://ENTITY_PROVIDER_ORGANIZATION_SETTINGS?default=firstconfigured",
"organizationmembercache": "env://ENTITY_PROVIDER_ORGANIZATION_MEMBER_CACHE?default=firstconfigured",
"repository": "env://ENTITY_PROVIDER_REPOSITORY?default=firstconfigured",
"repositorycache": "env://ENTITY_PROVIDER_REPOSITORY_CACE?default=firstconfigured",
"repositorycache": "env://ENTITY_PROVIDER_REPOSITORY_CACHE?default=firstconfigured",
"repositorycollaboratorcache": "env://ENTITY_PROVIDER_REPOSITORY_COLLABORATOR_CACHE?default=firstconfigured",
"repositoryteamcache": "env://ENTITY_PROVIDER_REPOSITORY_TEAM_CACHE?default=firstconfigured",
"teamcache": "env://ENTITY_PROVIDER_TEAM_CACHE?default=firstconfigured",

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

@ -483,6 +483,6 @@ Other fields:
- ms.approval-url: If the provided `ms-approval-type` is 'ReleaseReview', this must be provided to provide the URL. This URL will be validated so it must point at a valid approval URL.
- ms.justification: Human-readable justification text, if the `ms-approval-type` is 'Exempt'
- ms.entity: 'Microsoft' or '.NET Foundation', if the CLA is to be enabled (strongly recommended)
- ms.notify: a comman-separated list of e-mail address to notify about the creation of the repo if successful
- ms.notify: a comma-separated list of e-mail address to notify about the creation of the repo if successful
- ms.onBehalfOf: the GitHub username this operation is performed on behalf of. Providing this is a good call as it will redirect questions about the repo to the individual if needed rather than the service account.
- ms.project-type: product code, sample code, documentation, sdk, utility library / tool, other (new as of apiVersion=2017-07-27)

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

@ -79,7 +79,7 @@ Here is a short overview about the meanings of the different parameters:
### PostgreSQL Configuration
To run the opensource-portal with a postgres database, you need to [setup postgres](https://www.postgresql.org/docs/11/runtime.html) and initialize the database by running the `pg.sql`-file in the psql-terminal.
It's recommended to [run postgres in a docker container](https://hub.docker.com/_/postgres), there is also an offical docker image called `postgres` for building.
It's recommended to [run postgres in a docker container](https://hub.docker.com/_/postgres), there is also an official docker image called `postgres` for building.
Once the setup is done, set the `host`, `database`, `user`, `password`, `ssl` (as boolean) and `port` of the postgres in the `config/data.postgres.json`-file.
Additionally set the name of the linking-table (`tableName` parameter), if the tables were created with the `pg.sql`-file, the name for this table is `links`.

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

@ -16,7 +16,7 @@ variable value to `1`.
- Variable: `FEATURE_FLAG_ALLOW_UNAUTHORIZED_NEW_REPOSITORY_LOCKDOWN_SYSTEM`
- Purpose: Allows the "unauthorized new repository lockdown system" to be _available_ as an organization feature flag. It does not turn this system on by default in any case.
- Requirements: the event firehose must be used (there is no equivalent job, to make sure to not accidentially destroy permissions across existing repos)
- Requirements: the event firehose must be used (there is no equivalent job, to make sure to not accidentally destroy permissions across existing repos)
- allowUnauthorizedForkLockdownSystem

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

@ -6,7 +6,7 @@
import { IProviders } from '../interfaces';
import { Repository } from '../business';
// TODO: refresh occassionally.
// TODO: refresh occasionally.
const RepoSocialImagesCacheKey = 'repos:socialmediaimages';

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

@ -42,7 +42,7 @@ export default class SelfServiceTeamMemberToMaintainerUpgrades {
return this.#operations.allowSelfServiceTeamMemberToMaintainerUpgrades();
}
maximimumAllowedMembers(): number {
maximumAllowedMembers(): number {
const value = this.#operations.config.github?.teams?.maximumMembersToAllowUpgrade;
return value ? Number(value) : 0;
}
@ -60,8 +60,8 @@ export default class SelfServiceTeamMemberToMaintainerUpgrades {
return `There are currently ${maintainersCount} maintainers of the team. Self-service upgrade is only available if there are ${this.maximumAllowedMaintainers()} or fewer maintainers.`;
}
const membersCount = (await team.getMembers(cacheOptions)).length;
if (membersCount > this.maximimumAllowedMembers()) {
return `There are currently ${membersCount} members of the team. Self-service upgrade is only available if there are ${this.maximimumAllowedMembers()} or fewer members.`;
if (membersCount > this.maximumAllowedMembers()) {
return `There are currently ${membersCount} members of the team. Self-service upgrade is only available if there are ${this.maximumAllowedMembers()} or fewer members.`;
}
return { currentMaintainerCount: maintainersCount, currentMemberCount: membersCount };
}
@ -90,15 +90,15 @@ export default class SelfServiceTeamMemberToMaintainerUpgrades {
throw new Error('The authenticated user is not properly linked');
}
const login = individualContext.getGitHubIdentity().username;
const teamEligiblityResult: ISelfServiceAllowedResult | string = await this.isTeamEligible();
if (typeof teamEligiblityResult === 'string') {
throw new Error(teamEligiblityResult as string);
const teamEligibilityResult: ISelfServiceAllowedResult | string = await this.isTeamEligible();
if (typeof teamEligibilityResult === 'string') {
throw new Error(teamEligibilityResult as string);
}
const userIsTeamMember = await this.isUserTeamMember(login);
if (!userIsTeamMember) {
throw new Error('The user is not a member of the team and so cannot be upgraded');
}
return teamEligiblityResult as ISelfServiceAllowedResult;
return teamEligibilityResult as ISelfServiceAllowedResult;
}
async upgrade(individualContext: IndividualContext): Promise<void> {

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

@ -72,7 +72,7 @@ export enum CoreCapability {
Links = 'Links', // IOperationsLinks
Templates = 'Templates', // IOperationsTemplates
RepositoryMetadataProvider = 'RepositoryMetadataProvider', // IOperationsRepositoryMetadataProvider
Hiearchy = 'Hierarchy', // IOperationsHierarchy
Hierarchy = 'Hierarchy', // IOperationsHierarchy
Notifications = 'Notifications', // IOperationsNotifications
}

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

@ -67,17 +67,17 @@ async function processDeletedRepositories(providers: IProviders): Promise<void>
const organizationId = organization.id;
const repositoryId = Number(repositoryEntry.repository.id);
try {
const existance = await doesRepositoryExist(
const existence = await doesRepositoryExist(
i,
organization,
repositoryId,
repositoryEntry.cacheEntity.repositoryName
);
if (existance === true) {
if (existence === true) {
console.log(
`${i}: \t\t\trepository ${repositoryEntry.cacheEntity.repositoryName} with ID ${repositoryId} in org ${organization.name} exists`
);
} else if (existance === false) {
} else if (existence === false) {
console.log(
`${i}: repository deleted: ${repositoryEntry.cacheEntity.repositoryName} with ID ${repositoryId}, will cleanup`
);

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

@ -48,7 +48,7 @@
{
"name": "unlinkedMembers",
"title": "Unlinked organization members",
"description": "Organization members who are not linked cannot be accurately tracked. If they leave the company, they will not be automatically removed from the organization. Service accounts (GitHub machine accounts) need to also be linked so that a reponsible employee can be associated with the account.",
"description": "Organization members who are not linked cannot be accurately tracked. If they leave the company, they will not be automatically removed from the organization. Service accounts (GitHub machine accounts) need to also be linked so that a responsible employee can be associated with the account.",
"actionText": "Action Required: please identify and have these members link their accounts or remove them from your GitHub organization permanently.",
"isActionRequired": true,
"category": "weeklySummary",

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

@ -21,7 +21,7 @@ import app from '../../app';
import {
build as organizationsBuild,
consolidate as organizationsConsoldate,
consolidate as organizationsConsolidate,
process as organizationsProcess,
} from './organizations';
import {
@ -44,7 +44,7 @@ import { ICorporateLink, IReposJob, IReposJobResult } from '../../interfaces';
import { writeTextToFile } from '../../utils';
import { writeDeflatedTextFile } from './fileCompression';
// Debug-related values for convienience
// Debug-related values for convenience
const fakeSend = false;
const skipStore = false;
const slice = undefined; // 250;
@ -284,7 +284,7 @@ async function processReports(context) {
async function consolidateReports(context: IReportsContext): Promise<IReportsContext> {
try {
await organizationsConsoldate(context);
await organizationsConsolidate(context);
} catch (globalConsolidationError) {
console.dir(globalConsolidationError);
}

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

@ -126,7 +126,7 @@ export function SerializeObjectToEntityMetadata(
export function DeserializeEntityMetadataToObjectSetCollection(
entity: IEntityMetadata,
destinationIdFieldName: string,
serializationTranslationMap: Map<string, string> /*, allowOverridingIdFieldname: boolean*/
serializationTranslationMap: Map<string, string> /*, allowOverridingIdFieldName: boolean*/
): any {
const setCollection = {};
setCollection[destinationIdFieldName] = entity.entityId;

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

@ -677,9 +677,9 @@ export class PostgresEntityMetadataProvider implements IEntityMetadataProvider {
throw new Error('No rows or empty rows returned');
}
return skipEntityMapping ? rows : rows.map((row) => this.rowToMetadataObject(type, row));
} catch (errorish) {
console.dir(errorish);
throw errorish;
} catch (error) {
console.dir(error);
throw error;
}
}

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

@ -50,7 +50,7 @@ export class MicrosoftGraphProvider implements IGraphProvider {
#_tenantId: string;
#_tokenEndpoint: string;
#_cache: ICacheHelper;
#_skipManagerLookupForids: string[];
#_skipManagerLookupForIds: string[];
public clientId: string;
@ -62,9 +62,9 @@ export class MicrosoftGraphProvider implements IGraphProvider {
this.#_clientSecret = graphOptions.clientSecret;
this.#_tenantId = graphOptions.tenantId;
this.#_tokenEndpoint = graphOptions.tokenEndpoint;
this.#_skipManagerLookupForids = [];
this.#_skipManagerLookupForIds = [];
if (graphOptions.skipManagerLookupForIds) {
this.#_skipManagerLookupForids = splitSemiColonCommas(graphOptions.skipManagerLookupForIds);
this.#_skipManagerLookupForIds = splitSemiColonCommas(graphOptions.skipManagerLookupForIds);
}
this.#_cache = graphOptions.cacheProvider;
if (!this.clientId) {
@ -93,7 +93,7 @@ export class MicrosoftGraphProvider implements IGraphProvider {
async getUserAndManagerById(aadId: string): Promise<IGraphEntryWithManager> {
const entity = (await this.getTokenThenEntity(aadId, null)) as IGraphEntryWithManager;
if (this.#_skipManagerLookupForids?.includes(aadId)) {
if (this.#_skipManagerLookupForIds?.includes(aadId)) {
return entity;
}
try {

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

@ -24,8 +24,8 @@ const linkProviderInstantiationTypeProperty = '_i';
const dehydratedIdentityKey = '_lpi';
const dehydratedMemoryProviderName = 'mem';
const dehydratedMemoryProviderVersion = '0';
const dehydratedMemoryProviderIdentitySeperator = '_';
const dehydratedMemoryProviderIdentity = `${dehydratedMemoryProviderName}${dehydratedMemoryProviderIdentitySeperator}${dehydratedMemoryProviderVersion}`;
const dehydratedMemoryProviderIdentitySeparator = '_';
const dehydratedMemoryProviderIdentity = `${dehydratedMemoryProviderName}${dehydratedMemoryProviderIdentitySeparator}${dehydratedMemoryProviderVersion}`;
enum LinkInstantiatedType {
MemoryEntity,
@ -50,7 +50,7 @@ const linkInterfacePropertyMapping: IMemoryLinkProperties = {
corporateId: 'aadoid',
corporateUsername: 'aadupn',
corporateDisplayName: 'aadname',
corporateMailAddress: 'corporateMailAddres',
corporateMailAddress: 'corporateMailAddress',
corporateAlias: 'corporateAlias',
thirdPartyId: 'ghid',
@ -190,7 +190,7 @@ export class MemoryLinkProvider implements ILinkProvider {
}
if (identity !== dehydratedMemoryProviderIdentity) {
const sameProviderType = identity.startsWith(
`${dehydratedMemoryProviderName}${dehydratedMemoryProviderIdentitySeperator}`
`${dehydratedMemoryProviderName}${dehydratedMemoryProviderIdentitySeparator}`
);
if (sameProviderType) {
// Cross-version rehydration not supported

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

@ -37,8 +37,8 @@ const linkProviderInstantiationTypeProperty = '_i';
const dehydratedIdentityKey = '_lpi';
const dehydratedPostgresProviderName = 'pg';
const dehydratedPostgresProviderVersion = '0';
const dehydratedPostgresProviderIdentitySeperator = '_';
const dehydratedPostgresProviderIdentity = `${dehydratedPostgresProviderName}${dehydratedPostgresProviderIdentitySeperator}${dehydratedPostgresProviderVersion}`;
const dehydratedPostgresProviderIdentitySeparator = '_';
const dehydratedPostgresProviderIdentity = `${dehydratedPostgresProviderName}${dehydratedPostgresProviderIdentitySeparator}${dehydratedPostgresProviderVersion}`;
enum LinkInstantiatedType {
Row,
@ -360,7 +360,7 @@ export class PostgresLinkProvider implements ILinkProvider {
}
if (identity !== dehydratedPostgresProviderIdentity) {
const sameProviderType = identity.startsWith(
`${dehydratedPostgresProviderName}${dehydratedPostgresProviderIdentitySeperator}`
`${dehydratedPostgresProviderName}${dehydratedPostgresProviderIdentitySeparator}`
);
if (sameProviderType) {
// Cross-version rehydration not supported

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

@ -40,8 +40,8 @@ const linkProviderInstantiationTypeProperty = '_i';
const dehydratedIdentityKey = '_lpi';
const dehydratedTableProviderName = 'xtable';
const dehydratedTableProviderVersion = '0';
const dehydratedTableProviderIdentitySeperator = '_';
const dehydratedTableProviderIdentity = `${dehydratedTableProviderName}${dehydratedTableProviderIdentitySeperator}${dehydratedTableProviderVersion}`;
const dehydratedTableProviderIdentitySeparator = '_';
const dehydratedTableProviderIdentity = `${dehydratedTableProviderName}${dehydratedTableProviderIdentitySeparator}${dehydratedTableProviderVersion}`;
enum LinkInstantiatedType {
AzureTableEntity,
@ -393,7 +393,7 @@ export class TableLinkProvider implements ILinkProvider {
}
if (identity !== dehydratedTableProviderIdentity) {
const sameProviderType = identity.startsWith(
`${dehydratedTableProviderName}${dehydratedTableProviderIdentitySeperator}`
`${dehydratedTableProviderName}${dehydratedTableProviderIdentitySeparator}`
);
if (sameProviderType) {
// Cross-version rehydration not supported

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

@ -38,7 +38,7 @@ export default class SmtpMailService implements IMailProvider {
html: mail.content,
});
if (info.rejected.length > 0) {
console.warn(`Following reciepient addresses were rejected by the server:\n${info.rejected}`);
console.warn(`Following recipient addresses were rejected by the server:\n${info.rejected}`);
}
return info.response ? info.response : null;
} catch (err) {

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

@ -10,7 +10,7 @@ export default async function configureErrorRoutes(app: IReposApplication, initi
if (initializationError) {
console.warn('Initialization Error Present: All app requests will fail!');
// For convienience, failed initialization should appear
// For convenience, failed initialization should appear
// for any request. Should evaluate whether to hide for
// production scenarios or if there is a risk of the
// error message leaking sensitive data.

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

@ -114,7 +114,7 @@ export function attachGitHubPassportRoutes(
// legacy join:
// ============
// GitHub once supported users creating a brand new account during an initial auth
// request. I believe that this no longer works, since perhaps 2018; howevever, this
// request. I believe that this no longer works, since perhaps 2018; however, this
// used to work, and will not negatively impact the app at this time. Should revisit. -jw 2021
app.get('/signin/github/join', (req, res) => {
res.render('creategithubaccount', {

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

@ -779,7 +779,7 @@ async function triggerRenameNotification(
output: ITemporaryCommandOutput[]
): Promise<void> {
const { config, insights, operations, mailAddressProvider, viewServices } = providers;
insights.trackMetric({ name: 'RenameDefaultBranchs', value: 1 });
insights.trackMetric({ name: 'RenameDefaultBranches', value: 1 });
insights.trackEvent({
name: 'RenameDefaultBranch',
properties: {

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

@ -64,7 +64,7 @@ async function getReposAndOptionalTeamPermissions(
specificTeamRepos,
userContext: UserContext
): Promise<IGetReposAndOptionalTeamPermissionsResponse> {
// REMOVED: previously age information was avialable via getRepos(orgName, operations, (error, reposData, ageInformation). Was it really useful?
// REMOVED: previously age information was available via getRepos(orgName, operations, (error, reposData, ageInformation). Was it really useful?
const reposData = await getRepos(organizationId, operations, queryCache);
if (!teamsType || teamsType === 'all') {
// Retrieve the repositories for this specific repo, along with permissions information

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

@ -50,7 +50,7 @@ router.get(
}
const corporateId = req.individualContext.corporateIdentity.id;
if (!corporateId) {
return next(new Error('Corporate authentcation and identity required'));
return next(new Error('Corporate authentication and identity required'));
}
const currentState = await campaignStateProvider.getState(corporateId, campaignGroupId);
return res.json(currentState);
@ -69,7 +69,7 @@ async function modifySubscription(isUnsubscribing: boolean, req: ReposAppRequest
}
const corporateId = req.individualContext.corporateIdentity.id;
if (!corporateId) {
return next(new Error('Corporate authentcation and identity required'));
return next(new Error('Corporate authentication and identity required'));
}
const currentState = await campaignStateProvider.getState(corporateId, campaignGroupId);
if (currentState && currentState.optOut && isUnsubscribing) {

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

@ -19,7 +19,7 @@ import { ReposAppRequest, UserAlertType } from '../interfaces';
const validDaysBeforeNow = 21;
interface IHaveUndoCandiates extends ReposAppRequest {
interface IHaveUndoCandidates extends ReposAppRequest {
undoOperations: IUndoEntry[];
}
@ -292,7 +292,7 @@ async function undoTeamAdminRepoPermissionAsync(
}
router.use(
asyncHandler(async function (req: IHaveUndoCandiates, res, next) {
asyncHandler(async function (req: IHaveUndoCandidates, res, next) {
const { operations } = getProviders(req);
if (!operations.allowUndoSystem) {
res.status(404);
@ -323,7 +323,7 @@ router.use(
router.post(
'/',
asyncHandler(async (req: IHaveUndoCandiates, res, next) => {
asyncHandler(async (req: IHaveUndoCandidates, res, next) => {
const { operations } = getProviders(req);
const insights = operations.insights;
const link = req.individualContext.link;
@ -395,7 +395,7 @@ router.post(
router.get(
'/',
asyncHandler(async (req: IHaveUndoCandiates, res, next) => {
asyncHandler(async (req: IHaveUndoCandidates, res, next) => {
const { operations } = getProviders(req);
const insights = operations.insights;
insights?.trackMetric({ name: 'UndoPageViews', value: 1 });

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

@ -54,7 +54,7 @@ export interface IAggregateUserRepositories {
// TODO: the newer types, also...
}
export interface IAggregateLegacyUserRespositories {
export interface IAggregateLegacyUserRepositories {
byTeam: Repository[];
// byCollaboration: was originally designed but was too slow to work
}
@ -63,7 +63,7 @@ export interface IAggregateUserSummary {
organizations: IAggregateUserOrganizations;
teams: IAggregateUserTeams;
// TODO: rename repos to repositories
repos: IAggregateLegacyUserRespositories;
repos: IAggregateLegacyUserRepositories;
}
interface IRepositoryPermissionPair {
@ -78,7 +78,7 @@ export class UserContext {
private _queryCache: QueryCache;
private _linkManager: any;
private _organizations: IAggregateUserOrganizations;
private _legacyRepositories: IAggregateLegacyUserRespositories;
private _legacyRepositories: IAggregateLegacyUserRepositories;
private _teams: IAggregateUserTeams;
private _repositoryPermissions: IPersonalizedUserAggregateRepositoryPermission[];
@ -114,7 +114,7 @@ export class UserContext {
return this._teams;
}
async repositories(): Promise<IAggregateLegacyUserRespositories> {
async repositories(): Promise<IAggregateLegacyUserRepositories> {
if (this._legacyRepositories) {
return this._legacyRepositories;
}
@ -155,7 +155,7 @@ export class UserContext {
return known;
}
private async aggregateLegacyRepositories(): Promise<IAggregateLegacyUserRespositories> {
private async aggregateLegacyRepositories(): Promise<IAggregateLegacyUserRepositories> {
if (
this._queryCache &&
this._queryCache.supportsRepositoryCollaborators &&
@ -330,9 +330,9 @@ export class UserContext {
return { maintainer, member };
}
async getQueryCacheRepositories(): Promise<IAggregateLegacyUserRespositories> {
async getQueryCacheRepositories(): Promise<IAggregateLegacyUserRepositories> {
// Still only returning the legacy version, however...
const legacyResults: IAggregateLegacyUserRespositories = {
const legacyResults: IAggregateLegacyUserRepositories = {
byTeam: [],
};
@ -350,7 +350,7 @@ export class UserContext {
// legacy graph manager interop methods
async getGraphManagerRepos(): Promise<IAggregateLegacyUserRespositories> {
async getGraphManagerRepos(): Promise<IAggregateLegacyUserRepositories> {
const repos = await this._operations.graphManager.getUserReposByTeamMemberships(this.id, {});
return { byTeam: repos.map((personalized) => personalized.repository) };
// return { byTeam: repos.map(repo => this._operations.getRepositoryWithOrganization(repo.name, repo.organization.login, repo )) };

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

@ -5,7 +5,7 @@
//- Open Source Programs Office application and service HTML e-mail template
//- Jade variables:
//- - app: the name of the application or service, appears at the top of the e-mail or defaults to Microsoft Open Source
//- - reason: the reason that the receipient has been sent the e-mail. Can be raw HTML including a mailto: link
//- - reason: the reason that the recipient has been sent the e-mail. Can be raw HTML including a mailto: link
//- - subject: the subject of the e-mail
//- - headline: the headline for the e-mail for standard communications, appears in H1
//- - notification: if present, should be 'information', 'action', 'success' or 'warning'

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

@ -59,9 +59,9 @@ footer
.row(style='margin-bottom:12px')
if user && user.github && user.github.id
if config && config.corporate && config.corporate.trainingResources
- var footres = config.corporate.trainingResources.footer
if footres
each categoryList, category in footres
- var footers = config.corporate.trainingResources.footer
if footers
each categoryList, category in footers
div.col-md-3.col-lg-3
h5= category
ul.list-unstyled.small

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

@ -90,11 +90,11 @@ block content
if user && user.github && user.github.id
.alert-gray.pad
if config && config.corporate && config.corporate.trainingResources
- var footres = config.corporate.trainingResources.footer
if footres
- var footers = config.corporate.trainingResources.footer
if footers
// These same resources appear on every single auth page footer, too.
h3 Open Source Resources
each categoryList, category in footres
each categoryList, category in footers
h5= category
ul.list-unstyled
each item in categoryList

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

@ -34,7 +34,7 @@ block content
li I will enable multi-factor authentication on the account and keep it active as part of the onboarding policy. If I do not, I understand I may lose access at any moment.
li I understand that access to the GitHub organization is a privilege and that the right may be revoked for policy violations, including but not limited to turning off two factor authentication, shipping open source without business and/or legal approval, etc.
p If you have any questions about this, please contact your team's GitHub liason, LCA contact, or review the materials on the Open Source Hub.
p If you have any questions about this, please contact your team's GitHub liaison, LCA contact, or review the materials on the Open Source Hub.
p
a.btn.btn-primary(href='/signin/azure') Sign In to #{config.brand.companyName}

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

@ -371,7 +371,7 @@ async function setTeamPermission(
return false;
} else {
console.log(
`The read sytem team is still applied even with the compliance lock for repository ${repository.id}`
`The read system team is still applied even with the compliance lock for repository ${repository.id}`
);
}
}