зеркало из
1
0
Форкнуть 0
This commit is contained in:
Jeff Wilcox 2017-05-31 10:09:05 -07:00
Родитель 77ccdc6234
Коммит 92fcf12565
86 изменённых файлов: 3841 добавлений и 1201 удалений

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

@ -5,7 +5,7 @@
if alerts || serviceBanner || sudoMode
div.alerts
if sudoMode
//-if sudoMode
div.alert(id='sudo-banner', class='alert-danger')
div.container
h3 Organization Sudoer

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

@ -10,6 +10,6 @@ if showBreadcrumbs === true && breadcrumbs && breadcrumbs.length && breadcrumbs.
each crumb in breadcrumbs
li
if crumb.isLast === true || crumb.url === false
span.capitalize= crumb.title
span= crumb.title
else
a.capitalize(href=crumb.url)= crumb.title
a(href=crumb.url)= crumb.title

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

@ -21,4 +21,4 @@ block content
p Let's create a brand new GitHub username
div.col-sm-6.col-md-6.col-lg-6
p.lead Since GitHub is a third-party service, it has its own set of usernames, passwords, multi-factor authentication, and settings.
p.lead Since GitHub is a third-party service, it has its own set of usernames, passwords, multi-factor authentication, and settings.

6
views/email/body.pug Normal file
Просмотреть файл

@ -0,0 +1,6 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//-
block content
!= content

6
views/email/email.pug Normal file
Просмотреть файл

@ -0,0 +1,6 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//-
include body
include footer

23
views/email/footer.pug Normal file
Просмотреть файл

@ -0,0 +1,23 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//-
.appFooter
table(style='width:100%;', cellspacing=0, cellpadding=0)
tbody
tr
td(width='100%', colspan='2', style='height:28px')
p
tr
td(width='100%', colspan='2', style='height:12px)
tr
td
td
p.footer(style='text-align: right')
if version
| Repos #{version}
br
if correlationId
| Correlation ID: #{correlationId}
if view
| Template: #{view}

37
views/email/link.pug Normal file
Просмотреть файл

@ -0,0 +1,37 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends body
block content
if link.serviceAccount
h4 Service Account linked
h3 Congratulations!
p Your GitHub account is now linked with your corporate identity.
table
tbody
if link.serviceAccount
tr
td Service Account
td= link.aadupn
if link.serviceAccountMail
td Contact e-mail
td= link.serviceAccountMail
tr
td GitHub account
td= link.ghu
tr
td Corporate identity
td= link.aadupn
h3 Microsoft open source resources
p.
Take a moment to review the resources at #[a(href='https://opensource.microsoft.com/resources') https://opensource.microsoft.com/resources]:
ul
li Common GitHub questions, policies and resources relating to releasing open source
li Service account guidance
li Contributor license agreement info

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

@ -0,0 +1,40 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../body
block content
if wasApproved
h1
| Welcome to #{pendingRequest.teamname}  
small= org
p.lead A team maintainer has approved your request to join the GitHub team.
else
h1
| Your #{pendingRequest.teamname} request  
small= org
p.lead Unfortunately your request was not approved at this time. Your request has been closed.
if decisionNote
h2 Message from decision maker
table(style='width:80%')
tbody
tr
td
p.lead= decisionNote
h2 Decision maker
p
= decisionBy
br
= decisionEmail
if pendingRequest.justification
h2 Your request
table(style='width:80%')
tbody
tr
td
p= pendingRequest.justification

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

@ -0,0 +1,55 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../body
block content
h2
= team
|  
small= org
p.
An #{org} organization member has requested to join the <strong>"#{team}"</strong> team
on GitHub.
p In your role as a Team Maintainer, please approve or deny this request.
p
a(href=actionUrl, style='display:inline-block;background-color:#eee;font-size:18px;padding:12px') Review request
h3 Request details
table.technical(style='width:80%')
thead
tr
th(colspan=2) Requested by
tbody
tr
td
p
a(href='https://github.com/' + approvalRequest.ghu)= approvalRequest.ghu
td= approvalRequest.email
thead
tr
th(colspan=2) Team
tbody
tr
td GitHub organization
td= org
tr
td Team name
td= team
if approvalRequest.justification
thead
tr
th(colspan=2) Justification provided by #{personName || personMail}
tr
td(colspan=2)
p= approvalRequest.justification
p If you prefer not to click on email links, you can find this approval by:
ul
li Navigating to the open source repos site at #{reposSiteUrl}
li View your alerts, or go to the <em>/approvals</em> URL
li Review the request details

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

@ -0,0 +1,54 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../body
block content
h2
= team
| &nbsp;
small= org
p.
Your permission request has been submitted.
p
a(href=reposSiteUrl + 'approvals/', style='display:inline-block;background-color:#eee;font-size:18px;padding:12px') Review your requests here
h3 Request details
table.technical(style='width:80%')
thead
tr
th(colspan=2) Requested by
tbody
tr
td
p
a(href='https://github.com/' + approvalRequest.ghu)= approvalRequest.ghu
td= approvalRequest.email
thead
tr
th(colspan=2) Team
tbody
tr
td GitHub organization
td= org
tr
td Team name
td= team
if approvalRequest.justification
thead
tr
th(colspan=2) Justification provided by #{personName || personMail}
tr
td(colspan=2)
p= approvalRequest.justification
p If you prefer not to click on email links, you can find your requests by:
ul
li Navigating to the open source repos site at #{reposSiteUrl}
li Go to the <em>/approvals</em> URL
li Review your request details

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

@ -0,0 +1,26 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../body
block content
if context.securityUpdates
h3 Publishing/packaging scripts skipped
p The NPM publishing service is not a build service and is not able to transpile or otherwise run publishing-related NPM scripts.
p The user who authorized the publish #[strong acknowledged that it is OK to proceed] with publishing just the package files in lieu of running the defined publishing scripts.
p If a project is implemented in TypeScript, CoffeeScript, or other technology and needs to transpile, a minor incremental version update should now be performed.
p As the requesting user has been authorized to publish the NPM module, the user's standard NPM token and build process can be continued.
p Alternate options included:
ul
li Offering to publish from an alternate branch that could have the publish output committed
li Publishing a skeleton (nearly empty) package from a branch, then turning over control to the author
if log
h3 Operations
ul
each le in log
if le
li= le

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

@ -0,0 +1,61 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../body
block content
h1 #{approvalRequest.org}/#{approvalRequest.repoName}
p
| Repo URL:&nbsp;
a(href='https://github.com/' + approvalRequest.org + '/' + approvalRequest.repoName, target='_new') https://github.com/#{approvalRequest.org}/#{approvalRequest.repoName}
if api && service
p.lead #{approvalRequest.repoName} was created by #{service}
else if api
p.lead #{approvalRequest.repoName} was created by a service
else
p.lead.
Your repo <strong>"#{approvalRequest.repoName}"</strong> has been created in the <strong>"#{approvalRequest.org}"</strong> organization.
if approvalRequest.repoVisibility == 'private'
p.
Since the new repo is private, you may receive a 404 if you yourself are
not a member of one of the teams that you requested have access. Let
github-admin@microsoft.com know if you need support.
if approvalRequest.license
h3 License
p= approvalRequest.license
if approvalRequest.approvalType
h3 Open Source Approval
p
| Type of approval: #{approvalRequest.approvalType}
if approvalRequest.approvalUrl
br
| Approval: #{approvalRequest.approvalUrl}
if approvalRequest.justification
br
| Justification: #{approvalRequest.justification}
if service || serviceOwner || serviceDescription
h3 Service information
p This repo was created by a service:
table.technical
thead
tr
if service
th Service
if serviceDescription
th Service information
tbody
tr
if service
td= service
if serviceDescription
td= serviceDescription
if results && results.length
h3 Operations performed
ul
each result in results
li(style=result.error ? 'color:red' : undefined)= result.message

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

@ -0,0 +1,48 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../body
block content
h1 #{pendingRequest.org}/#{pendingRequest.repoName}
if wasApproved
p
| Repo URL:&nbsp;
a(href='https://github.com/' + pendingRequest.org + '/' + pendingRequest.repoName, target='_new') https://github.com/#{pendingRequest.org}/#{pendingRequest.repoName}
p.lead.
Your repo <strong>"#{pendingRequest.repoName}"</strong> has been created in the <strong>"#{pendingRequest.org}"</strong> organization successfully.
if pendingRequest.repoVisibility == 'private'
p.
Since the new repo is private, you may receive a 404 if you yourself are
not a member of one of the teams that you requested have access. Let
github-admin@microsoft.com know if you need support.
if results.length
h3 Operations Performed
ul
each result in results
li(style=result.error ? 'color:red' : undefined)= result.message
else
p Unfortunately your request was not approved at this time. Your request has been closed.
if decisionNote
h2 Message from decision maker
table(style='width:80%')
tbody
tr
td
p.lead= decisionNote
h2 Decision maker
p
= decisionBy
br
= decisionEmail
if pendingRequest.justification
h2 Your request
table(style='width:80%')
tbody
tr
td
p= pendingRequest.justification

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

@ -0,0 +1,72 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../body
block content
h2
| #{approvalRequest.org}/#{approvalRequest.repoName}
| &nbsp;
small= approvalRequest.repoVisibility
p.
A user has requested a new repo in the #{approvalRequest.org} org.
if approvalRequest.repoVisibility === 'private'
p This request is for a private repo.
p Per Microsoft policy, private GitHub repos are designated for projects going open source soon.
p
a(href=actionUrl, style='display:inline-block;background-color:#eee;font-size:18px;padding:12px') Review request
h3 Request details
table.technical(style='width:80%')
thead
tr
th(colspan=2) Requested by
tbody
tr
td
p
a(href='https://github.com/' + approvalRequest.ghu)= approvalRequest.ghu
td= approvalRequest.email
thead
tr
th(colspan=2) Repo information
tbody
tr
td GitHub organization
td= approvalRequest.org
tr
td Repository name
td= approvalRequest.repoName
if approvalRequest.repoDescription
tr
td Repo description
td= approvalRequest.repoDescription
tr
td Initial visibility
td= approvalRequest.repoVisibility === 'public' ? 'Public' : 'Private'
if approvalRequest.justification
thead
tr
th(colspan=2) Justification
tr
td(colspan=2)= approvalRequest.justification
thead
tr
th(colspan=2) Permissions
if approvalRequest.teamsCount
tr
td Authorized teams
td= approvalRequest.teamsCount
h4 Protect yourself from phishing
p If you prefer not to click on email links, you can find this approval by:
ul
li Navigating to the open source repos site at #{reposSiteUrl}
li View your alerts, or go to the <em>/approvals</em> URL
li Review the request details

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

@ -0,0 +1,72 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../body
block content
h2
| #{approvalRequest.org}/#{approvalRequest.repoName}
| &nbsp;
small= approvalRequest.repoVisibility
p.
Your request has been submitted.
if approvalRequest.repoVisibility === 'public'
p This request is for a public repo, so if your request is approved, the repo will be visibility immediately. If you did not intend for this to go public, please cancel this request.
else if approvalRequest.repoVisibility === 'private'
p This request is for a private repo. Please note that there may be a limit to the number of private repos for the organization.
p Per Microsoft policy, GitHub is not a permitted source control system for MBI source code and is only intended for open source projects, or those currently in the release approval process pending going public as open source. This request may be denied if there is reason to believe that it is a private engineering effort. Please consider VSTS/1ES for any internal projects.
p
a(href=reposSiteUrl + 'approvals/', style='display:inline-block;background-color:#eee;font-size:18px;padding:12px') Review your requests here
table.technical(style='width:80%')
thead
tr
th(colspan=2) Requested by
tbody
tr
td
p
a(href='https://github.com/' + approvalRequest.ghu)= approvalRequest.ghu
td= approvalRequest.email
thead
tr
th(colspan=2) Repo information
tbody
tr
td GitHub organization
td= approvalRequest.org
tr
td Repository name
td= approvalRequest.repoName
if approvalRequest.repoDescription
tr
td Repo description
td= approvalRequest.repoDescription
tr
td Initial visibility
td= approvalRequest.repoVisibility === 'public' ? 'Public' : 'Private'
if approvalRequest.justification
thead
tr
th(colspan=2) Justification
tr
td(colspan=2)= approvalRequest.justification
thead
tr
th(colspan=2) Permissions
if approvalRequest.teamsCount
tr
td Authorized teams
td= approvalRequest.teamsCount
p If you prefer not to click on email links, you can find your requests by:
ul
li Navigating to the open source repos site at #{reposSiteUrl}
li Go to the <em>/approvals</em> URL
li Review your request details

9
views/email/report.pug Normal file
Просмотреть файл

@ -0,0 +1,9 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends body
block content
!= html

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

@ -9,16 +9,22 @@ block content
div.container#top(style='margin-top:60px')
div.container#content
div.row
div.col-md-4
p
img(src='/img/rainycloud.png', style='border:0; width:318px; height:318px', title="It's a rainy day. This is an error page.")
div.col-md-2
if skipOops
//- There are scenarios where you do not want this to seem too bad
else
p
img(src='/img/rainycloud.png', style='border:0; width:159px; height:159px', title="It's a rainy day. This is an error page.")
div.col-md-8
p
em
| Oops.&nbsp;
if !skipLog
| It's a little rainy in the cloud today.
div.col-md-7
if skipOops
//- There are scenarios where you do not want this to seem too bad
else
p
em
| Oops.&nbsp;
if !skipLog
| It's a little rainy in the cloud today.
if messageHasNonHtmlNewlines === true
pre= message
@ -41,17 +47,17 @@ block content
a.btn.btn-sm.btn-default(href='about:blank', onclick='window.history.back(); return false;') Go back
| &nbsp; &nbsp;
if config && config.corporate && config.corporate.portalAdministratorEmail
if config && config.brand && config.brand.supportMail
- var issueType = skipLog ? 'Ask a portal maintainer for assistance' : 'Report bug'
- var reportedUrl = scrubbedUrl && serverAddress ? 'URL: ' + serverAddress + scrubbedUrl : ''
if correlationId && user && user.github && user.github.username
a.btn.btn-sm.btn-muted(href='mailto:' + config.corporate.portalAdministratorEmail + '?subject=Open Source Portal Error Message ' + (encodedMessage ? ': ' + encodedMessage : '') + '&body=I ran into an error message while using the open source portal.%0D%0A%0D%0AThe error included a Correlation ID: ' + correlationId + '%0D%0A%0D%0ATo speed this request up, could you also share information about what you were trying to do at the time of the error? Thanks.%0D%0A%0D%0A---%0D%0AGitHub username: ' + user.github.username + (encodedMessage ? '%0D%0AMessage: ' + encodedMessage : '') + (error.status ? '%0D%0AStatus Code: ' + error.status : '') + (detailed ? '%0D%0ADetailed Message: ' + encodedDetailed : '') + '%0D%0A' + reportedUrl)
if correlationId && primaryUser
a.btn.btn-sm.btn-muted(href='mailto:' + config.brand.supportMail + '?subject=Open Source Portal Error Message ' + (encodedMessage ? ': ' + encodedMessage : '') + '&body=I ran into an error message while using the open source portal.%0D%0A%0D%0AThe error included a Correlation ID: ' + correlationId + '%0D%0A%0D%0ATo speed this request up, could you also share information about what you were trying to do at the time of the error? Thanks.%0D%0A%0D%0A---%0D%0AUsername: ' + (user && user.github && user.github.username ? user.github.username : primaryUser.username) + (encodedMessage ? '%0D%0AMessage: ' + encodedMessage : '') + (error.status ? '%0D%0AStatus Code: ' + error.status : '') + (detailed ? '%0D%0ADetailed Message: ' + encodedDetailed : '') + '%0D%0A' + reportedUrl)
= ' ' + issueType
else if correlationId
a.btn.btn-sm.btn-muted(href='mailto:' + config.corporate.portalAdministratorEmail + '?subject=Open Source Portal Error Message&body=I ran into an error message while using the open source portal.%0D%0A%0D%0AThe error included a Correlation ID: ' + correlationId + '%0D%0A%0D%0ATo speed this request up, could you also share information about your GitHub username and what you were trying to do at the time of the error? Thanks.' + '%0D%0A' + reportedUrl)
a.btn.btn-sm.btn-muted(href='mailto:' + config.brand.supportMail + '?subject=Open Source Portal Error Message&body=I ran into an error message while using the open source portal.%0D%0A%0D%0AThe error included a Correlation ID: ' + correlationId + '%0D%0A%0D%0ATo speed this request up, could you also share information about your GitHub username and what you were trying to do at the time of the error? Thanks.' + '%0D%0A' + reportedUrl)
= ' ' + issueType
else
a.btn.btn-sm.btn-muted(href='mailto:' + config.corporate.portalAdministratorEmail + '?subject=Open Source Portal Error Message&body=I ran into an error message while using the open source portal.%0D%0A%0D%0AThe error message did not include a Correlation ID.' + '%0D%0A' + reportedUrl)
a.btn.btn-sm.btn-muted(href='mailto:' + config.brand.supportMail + '?subject=Open Source Portal Error Message&body=I ran into an error message while using the open source portal.%0D%0A%0D%0AThe error message did not include a Correlation ID.' + '%0D%0A' + reportedUrl)
= ' ' + issueType
if correlationId

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

@ -0,0 +1,75 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../../layout
block content
.container
.row: .col-sm-12
.nav
ul.pager.zero-pad-bottom
li.previous
a(href='/' + organization.name + '/repos/' + repository.name)
span(aria-hidden=true) &larr;
= ' Back to the ' + repository.name + ' repository'
if !npmUsername
.row: .col-sm-12
h2 Please create and/or register your NPM account
p.
To enable NPM publishing, you must register your NPM username. After the package has
been published, your NPM account will be given collaborator/owner status so that you
may publish the package with your own account in the future.
ul.list-inline
li: a.btn.btn-primary(href='/settings/npm') Register existing NPM username
li: a.btn.btn-default(href='https://www.npmjs.com/signup', target='_new') Create an NPMJS account
hr
p: small.
After registering your account, come back to this page to continue package publishing. If
you created a new NPMJS account, you will also need to refresh this page first.
else
.row: .col-sm-12
h1 NPM publishing
.row
.col-md-8
p.lead A repository with a #[code package.json] file can be published to the NPM registry.
form(method='post', action='/' + organization.name + '/repos/' + repository.name + '/extensions/npm/publish')
.form-group
label(for='branch') Branch to publish
select.form-control#branch(name='branch')
each branch in branches
option(value=branch.name, selected=branch.name == 'master')= branch.name
.form-group
label NPM collaborator
input.form-control(disabled=true, value=npmUsername)
.form-group
label(for='collaborators') Additional collaborators
= ' (optional, comma-separated NPM usernames)'
input.form-control#collaborators(name='collaborators', placeholder='Additional collaborators')
if userChoiceError
.checkbox
label
input#acknowledge(type='checkbox', name='acknowledge')
strong I acknowledge that my package build scripts will not be executed
br
| Your #[code package.json] file contains scripts that will not be executed, as this is a publishing service and not a full-fledged build provider.
p: input.btn.btn-primary(type='submit', value='Publish')
.col-md-4
p This self-service tool will publish the branch as an NPM package from an official account.
p.
After publishing, your NPM account, #[strong= npmUsername] will be able to publish package
updates in the future.
p You can also authorize other users to publish the package.

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

@ -0,0 +1,28 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../../layout
block content
.container
.row: .col-sm-12
.nav
ul.pager.zero-pad-bottom
li.previous
a(href='/' + organization.name + '/repos/' + repository.name)
span(aria-hidden=true) &larr;
= ' Back to the ' + repository.name + ' repository'
.row: .col-sm-12
h1 Published #{context.packageVersionedName}
if log
ul
each l in log
if l
li= l
if context && context.package && context.package.name
p: a.btn.btn-sm.btn-muted(href='https://npmjs.org/package/' + context.package.name)= 'View ' + context.package.name

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

@ -3,81 +3,91 @@
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
footer.wiki-footer
footer
hr
div.container
div
p(class='pull-right')
a(href='#top', title=headSha) Back to top
if ! user
| &middot;
a(href='/signin/github') Sign In
if config && config.showDebugFooter === true
div.clearfix
div.row.alert-gray(style='padding:12px')
.container
if config && config.debug && config.debug.showDebugFooter === true
.clearfix
.row.alert-gray(style='padding:12px')
h6 Instance Configuration
div.col-md-6.col-lg-6
.col-md-6.col-lg-6
if correlationId
h4 Correlation ID: #{correlationId}
if serverName
h4 Hostname: #{serverName}
if config && config.applicationInsights && config.applicationInsights.instrumentationKey
if config && config.telemetry && config.telemetry.applicationInsightsKey
h4 AppInsights: Instrumented
if config && config.telemetry && config.telemetry.googleAnalyticsKey
h4 Google Analytics: Tracking
if config && config.authentication.scheme
h4
| Primary Authentication: #{config.authentication.scheme === 'github' ? 'GitHub' : 'Azure Active Directory'}
if config && config.session.encryption !== undefined
h4
| Session Encryption: #{config.session.encryption === true ? 'Encrypted' : 'Plain Text'}
if config && config.azureStorage.encryption !== undefined
if config && config.github.links.table.encryption !== undefined
h4
| Table Encryption: #{config.azureStorage.encryption === true ? 'Encrypted' : 'Plain Text'}
div.col-md-6.col-lg-6(style='background-color:white')
if config && config.azureStorage
| Table Encryption: #{config.github.links.table.encryption === true ? 'Encrypted' : 'Plain Text'}
.col-md-6.col-lg-6(style='background-color:white')
if serverName
h4 Hostname: #{serverName}
if serverAddress
h4 Server: #{serverAddress}
if websiteHostname
h4 Site: #{websiteHostname}
if config && config.github.links.table
h4
| Storage:&nbsp;
span.bg-danger(style='color:white;padding:2px')= config.azureStorage.account
span.bg-danger(style='color:white;padding:2px')= config.github.links.table.account
h4
| Storage Prefix: #{config.azureStorage.prefix}
| Storage Prefix: #{config.github.links.table.prefix}
if config && config.redis
h4
| Redis:&nbsp;
span.bg-danger(style='color:white;padding:2px')= config.redis.host
span.bg-danger(style='color:white;padding:2px')= config.redis.host || config.redis.tls
h4
| Redis Prefix: #{config.redis.prefix}
if user && user.github && user.github.id
if config && config.corporate && config.corporate.trainingResources
- var footres = config.corporate.trainingResources.footer
if footres
div.clearfix
div.row(style='margin-bottom:24px')
.clearfix
.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
div.col-md-3.col-lg-3
h5= category
ul.list-unstyled
ul.list-unstyled.small
each item in categoryList
li
a(href=item.link)= item.title
div.clearfix
p
small It is important to note that uptime of this service is dependent on GitHub's API availability and rate limit.
ul.list-inline
if config && config.corporate && config.corporate.portalAdministratorEmail
li
a(href='mailto:' + config.corporate.portalAdministratorEmail) Contact Portal Administrator
li
a(href='https://github.com/azure/azure-oss-portal', target='_new') Contribute to this portal on GitHub
div
p
small
| &copy; #{config && config.companyName ? config.companyName : ''}
div.col-md-3.col-lg-3
h5(class='pull-right')
a(href='#top', title=headSha) Back to top
else
.col-sm-12.col-md-12.col-lg-12
h5(class='pull-right')
a(href='#top', title=headSha) Back to top
.row.small
.col-sm-6.col-md-6.col-lg-6
.clearfix
ul.list-inline(style='margin-bottom: 0px')
if config && config.brand && config.brand.supportMail
li
a(href='mailto:' + config.brand.supportMail) Contact site administrator
li
a(href='https://github.com/microsoft/ospo-opensource-repos', target='_new') &nbsp;&nbsp;Contribute to this site on GitHub
if serverName && correlationId
| Powered by&nbsp;
a(href='/thanks') great open source,&nbsp;
span(title=correlationId + ' ' + serverName) Microsoft Azure,&nbsp;
| and the GitHub API
else
| Powered by <a href="/thanks">great open source</a>, Microsoft Azure, and the GitHub API
.col-sm-6.col-md-6.col-lg-6
.pull-right.text-right
a#microsoftFooterLogo(href='https://microsoft.com', title='Microsoft')
img(src='/img/microsoft.png', alt='Microsoft', style='max-height:23px')
br
if serverName && correlationId
| Powered by&nbsp;
span(title=correlationId + ' ' + serverName) Microsoft Azure,&nbsp;
a(href='/thanks') great open source&nbsp;
| and the GitHub API
else
| Powered by Microsoft Azure,&nbsp;
a(href='/thanks') great open source&nbsp;
| and the GitHub API
span &copy; #{config && config.brand.companyName ? config.brand.companyName : ''}
.row
div(style='margin-bottom: 30px')

14
views/ga.pug Normal file
Просмотреть файл

@ -0,0 +1,14 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
if (googleAnalyticsKey)
script.
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '#{googleAnalyticsKey}', 'auto');
ga('send', 'pageview');

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

@ -4,29 +4,31 @@
//-
head
- var resourceVersion = '4a'
meta(charset='utf-8')
title= (user && user.primaryUsername) ? title + ' - ' + user.primaryUsername : title
//-title= (user && user.primaryUsername) ? title + ' - ' + user.primaryUsername : title
title= title
meta(http-equiv='X-UA-Compatible', content='IE=edge')
meta(name='viewport', content='width=device-width, initial-scale=1.0')
meta(name='author', content='Microsoft Open Source')
link(href='/css/bootstrap.min.css?1a', rel='stylesheet')
link(href='/repos-css/oss.css?2b', rel='stylesheet')
link(href='/css/bootstrap.min.css?' + resourceVersion, rel='stylesheet')
link(href='/repos-css/oss.css?' + resourceVersion, rel='stylesheet')
link(href='/css/octicons.css?' + resourceVersion, rel='stylesheet')
link(rel='shortcut icon', href='/favicon.ico')
link(rel='apple-touch-icon', sizes='114x114,72x72,144x144,60x60,120x120,76x76,152x152,180x180', href='/favicon-144.png')
meta(name='msapplication-config', content='none')
//[if lt IE 9]
<script src="https://ajax.aspnetcdn.com/ajax/respond/1.4.2/respond.min.js"/>
[endif]
script(type='text/javascript', src='/js/jquery.min.js')
script(type='text/javascript', src='/js/bootstrap.min.js')
script(type='text/javascript', src='/js/jquery.timeago.js')
script(type='text/javascript', src='/js/jquery.uitablefilter.js')
block additional_head
block js
script(type='text/javascript', src='/js/jquery.min.js')
script(type='text/javascript', src='/js/bootstrap.min.js')
script(type='text/javascript', src='/js/jquery.timeago.js')
script(type='text/javascript', src='/js/jquery.uitablefilter.js')
| <script type='text/javascript'>
| $(document).ready(function() {
block js_doc_ready
| jQuery('time').timeago();
if alerts
each alert in alerts
| setTimeout(function () {$('#layout-alert-#{alert.number}').alert('close');}, 8000 * #{alert.number});
| });
| </script>

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

@ -12,85 +12,86 @@ block js_doc_ready
| } catch(ex) {};
block content
- var overview = accountInfo ? accountInfo.overview : null
div.container
if onboarding === true
h1.huge Hi.
if user && user.azure
h1.huge Congratulations, #{user.azure.displayName || user.azure.username}
else
h1.huge Congratulations
else
h1
//h1
| Open Source Portal&nbsp;
small for GitHub
if accountInfo && onboarding !== true
div.container
div.row(style='margin-top:16px')
// linked membership
div.col-md-4.col-lg-4.col-sm-4
if accountInfo.isLinkedUser !== false
div.metro-box.ms-blue
a(href='/unlink')
h3 Linked Identity
p= config.companyName.toUpperCase()
else
div.metro-box.ms-light-gray
a(href='/link')
h3 Not linked
p= config.companyName.toUpperCase()
// 2-factor authentication
if accountInfo.twoFactorOff === true || accountInfo.twoFactorOn === true
div.col-md-4.col-lg-4.col-sm-4
if accountInfo.twoFactorOff === true
div.metro-box.ms-red
a(href=activeOrgUrl + 'security-check')
h3 2FA
p OFF
else if accountInfo.twoFactorOn === true
div.metro-box.ms-green
a(href=activeOrgUrl + 'security-check')
h3 2-factor auth
p PROTECTED
div.row(style='margin-top:16px')
div.col-md-4.col-lg-4.col-sm-4
if accountInfo.isLinkedUser !== false
p You've linked your GitHub and corporate identities.
else
p To join the organization, you need to <a href="/link">link your GitHub and Microsoft-related identities</a>.
div.col-md-4.col-lg-4.col-sm-4
if accountInfo.twoFactorOff === true || accountInfo.twoFactorOn === true
if accountInfo.twoFactorOff === true
p Your account is a security risk and is not in compliance. <strong>Your access may be revoked at any time, without notice, and may cause work stoppage or loss.</strong>
else if accountInfo.twoFactorOn === true
p Your account uses modern security. Thank you.
div.col-md-8
if accountInfo && onboarding !== true
if accountInfo.isLinkedUser !== false && accountInfo.twoFactorOn === true
// No longer showing this UI on the homepage for good states
else
div.container
div.row(style='margin-top:16px')
// linked membership
div.col-md-4.col-lg-4.col-sm-4
if accountInfo.isLinkedUser !== false
div.metro-box.ms-blue
a(href='/unlink')
h3 Linked Identity
p= config.brand.companyName.toUpperCase()
else
div.metro-box.ms-light-gray
a(href='/link')
h3 Not linked
p= config.brand.companyName.toUpperCase()
// 2-factor authentication
if accountInfo.twoFactorOff === true || accountInfo.twoFactorOn === true
div.col-md-4.col-lg-4.col-sm-4
if accountInfo.twoFactorOff === true
div.metro-box.ms-red
a(href=activeOrgUrl + 'security-check')
h3 2FA
p AT RISK
else if accountInfo.twoFactorOn === true
div.metro-box.ms-green
a(href=activeOrgUrl + 'security-check')
h3 2-factor auth
p PROTECTED
if accountInfo.organizations
if onboarding !== true
if onboarding !== true && overview && overview.organizations.member && overview.organizations.member.length
h1
a.a-unstyled(name='orgs') #{config.companyName} Organizations
if onboarding === true
h3 Please select the organization that you would like to join.
a.a-unstyled(name='orgs') Your #{config.brand.companyName} GitHub organizations
else
h3 You've successfully linked your #{config.brand.companyName} and GitHub accounts.
- var currentPriority = ''
each o in accountInfo.organizations
if o.setting('priority') !== currentPriority
- currentPriority = o.setting('priority')
if currentPriority == 'secondary'
h2 Additional Organizations
p Here are additional organizations that are managed by this portal but are intended for specific teams, projects and purposes.
div.link-box
a(href=o.baseUrl + (o.membershipStateTemporary === 'active' ? '' : 'join') + onboardingPostfixUrl)
h2
strong.capitalize= o.name + ' '
if o.membershipStateTemporary == 'active'
small Member
else if o.membershipStateTemporary == 'pending'
small
span.label.label-danger Membership Pending
else
small
if o.setting('locked')
span.label.label-default Locked
else
span.label.label-primary Join this organization
p.lead= o.setting('description')
each o in overview.organizations.member
div.link-box
a(href=o + onboardingPostfixUrl)
h2: strong= o
//-else if o.membershipStateTemporary === 'pending'
small
span.label.label-danger Membership pending
- var oo = getOrg(o)
if oo.description
p.lead= oo.description
if onboarding === true
h3 Your onboarding progress
h5
| Sign in to your GitHub &amp; #{config.brand.companyName} accounts&nbsp;
i.glyphicon.glyphicon-ok
h5
| Link your accounts&nbsp;
i.glyphicon.glyphicon-ok
h5.text-primary
| Join your first GitHub organization
h5
| Multifactor security checkup
h5
| Profile review
h5
| Publish your membership <em>(optional)</em>
h5
| Join a team <em>(optional)</em>
//-if accountInfo.isSudoer
h1 Organization Administration
@ -98,24 +99,25 @@ block content
p
a.btn.btn-default(href='/organization') Organization Delegate Dashboard
if accountInfo.teamsMaintained && accountInfo.teamsMaintained.length && accountInfo.teamsMaintained.length > 0
if overview.teams.maintainer && overview.teams.maintainer.length
if accountInfo.pendingApprovals && accountInfo.pendingApprovals.length && accountInfo.pendingApprovals.length > 0
h1 Approvals: Please Review
p
a.btn.btn-default(href='/approvals/') See all pending approvals (#{accountInfo.pendingApprovals.length})
if accountInfo.teamsMaintained
h1 Teams You Maintain
if overview.teams.maintainer
h1 Teams you maintain
script(type='text/javascript').
function initializeManageFilter() {
var inputManageFilter = $('#manage-filter');
if (inputManageFilter) {
inputManageFilter.keyup(function () {;
$.uiTableFilter($('table#manage-table'), this.value, ['Title', 'Organization', 'GitHub Name']);
$.uiTableFilter($('table#manage-table'), this.value, ['Title', 'Organization', 'GitHub name']);
});
}
}
div.container
//-div.container
div
table.table#manage-table
thead
tr
@ -126,27 +128,24 @@ block content
p
i.glyphicon.glyphicon-search
tr
th GitHub Name
th GitHub name
th Organization
th Actions
tbody
each team in accountInfo.teamsMaintained
each team in overview.teams.maintainer
tr
td
a.btn.btn-sm.btn-muted(href=team.org.baseUrl + 'teams/' + team.slug)= team.name
td.twentypercent.capitalize= team.org.name
a.btn.btn-sm.btn-muted(href='/' + team.organization.login + '/teams/' + team.slug)= team.name
td.twentypercent= team.organization.login
td.thirtypercent
p
a.btn.btn-sm.btn-default(href=team.org.baseUrl + 'teams/' + team.slug) Manage Team + ' '
a.btn.btn-default.btn-sm(href='https://github.com/orgs/' + team.org.name + '/teams/' + team.slug, target='_new')
| Open on GitHub
i.glyphicon.glyphicon-share-alt
ul.list-unstyled
li: a.btn.btn-sm.btn-default(href='/' + team.organization.login + '/teams/' + team.slug) Manage
//-li: a.btn.btn-sm.btn-muted(href='https://github.com/orgs/' + team.organization.login + '/teams/' + team.slug, target='_new') GitHub
if accountInfo.isLinkedUser && onboarding !== true
h1 Team Memberships
if accountInfo.teamsMaintainedHash
if overview.teams && overview.teams.member && overview.teams.member.length
h1 Team memberships
p Here are teams that you are a member of but not a maintainer of.
if accountInfo.userTeamMemberships && accountInfo.userTeamMemberships.length && accountInfo.userTeamMemberships.length > 0
script(type='text/javascript').
function initializeMembershipFilter() {
var inputMembershipFilter = $('#membership-filter');
@ -170,28 +169,60 @@ block content
th Organization
th Actions
tbody
each team in accountInfo.userTeamMemberships
each team in overview.teams.member
if team.id && accountInfo.teamsMaintainedHash && accountInfo.teamsMaintainedHash[team.id] !== undefined
// Skipping this team since they are already maintaining it
else
tr
td
a.capitalize.btn.btn-sm.btn-muted(href='https://github.com/orgs/' + team.org.name + '/teams/' + team.slug, target='_new')= team.name
td.twentypercent.capitalize= team.org.name
a.btn.btn-sm.btn-muted(href='/' + team.organization.login + '/teams/' + team.slug, target='_new')= team.name
//-a.btn.btn-sm.btn-muted(href='https://github.com/orgs/' + team.organization.login + '/teams/' + team.slug, target='_new')= team.name
td.twentypercent= team.organization.login
td.twentypercent
p
if config.github.teamEveryoneId == team.id
a.btn.btn-default.btn-sm(href=team.org.baseUrl + '/leave') Leave Organization
a.btn.btn-default.btn-sm(href='/' + team.organization.login + '/leave') Leave Organization
else
a.btn.btn-default.btn-sm(href='https://github.com/orgs/' + team.org.name + '/teams/' + team.slug, target='_new')
//-a.btn.btn-default.btn-sm(href='https://github.com/orgs/' + team.organization.login + '/teams/' + team.slug, target='_new')
a.btn.btn-default.btn-sm(href='/' + team.organization.login + '/teams/' + team.slug, target='_new')
| Open on GitHub
i.glyphicon.glyphicon-share-alt
//- The user will get a better experience joining teams if they go through the organization onboarding first.
//-p
a.btn.btn-default(href='/teams')= (accountInfo.userTeamMemberships && accountInfo.userTeamMemberships.length && accountInfo.userTeamMemberships.length > 0) ? 'Join another team' : 'Join a team'
else
p You are not currently a member of any GitHub teams that grant you permission to specific repositories. Note that this display is cached and may not be up-to-date.
//-p You are not currently a member of any GitHub teams that grant you permission to specific repositories. Note that this display is cached and may not be up-to-date.
div.col-md-4
if overview.organizations.available && overview.organizations.available.length
h2 Available #{config.brand.companyName} GitHub organizations
.right
if onboarding === true
p Join these #{config.brand.companyName} organizations to see private repos and get elevated privileges.
hr
p
a.btn.btn-default(href='/unlink') Remove my corporate GitHub access
- var currentPriority = ''
if groupedAvailableOrganizations
each list, groupType in groupedAvailableOrganizations
if groupType === 'secondary'
hr
h5 Additional Organizations
p.small The following organizations are specialized for specific teams and projects, but not general-purpose membership. Please only join if you have a business need.
each o in list
//-if o.membershipStateTemporary !== 'active' && o.membershipStateTemporary !== 'pending'
if o.priority !== currentPriority
- currentPriority = o.priority
//-if currentPriority == 'secondary'
//-if o.locked === true // o.membershipStateTemporary !== 'active'
if o.locked === true
//- Do not show by invitation only orgs at this time
else
div.link-box
a(href='/' + o.name + '/join' + onboardingPostfixUrl)
if groupType === 'secondary'
h6.text-muted
strong= o.name + ' '
small: span.label.label-muted Join
p.small.text-mute= o.description
else
h4
= o.name + ' '
small: span.label.label-primary Join
p.small(style='color:#333')= o.description

79
views/js/metrics.js Normal file
Просмотреть файл

@ -0,0 +1,79 @@
function displayRepoMetrics(repoId, orgId) {
$.get('/api/client/metrics/repos/' + repoId, function (repoData) {
if (!repoData.metrics[0]) {
$('#metrics').hide();
return;
}
displayStats(repoData.metrics[0]);
$.get('/api/client/metrics/orgs/' + orgId, function (orgData) {
displayChart(repoData.metrics[0], orgData.metrics[0]);
});
});
}
function displayStats(repoData) {
$('#contributors').text(Number(repoData.Contributors).toLocaleString());
$('#subscribers').text(Number(repoData.Subscribers).toLocaleString());
$('#openIssues').text(Number(repoData.OpenIssues).toLocaleString());
$('#closedIssues').text(Number(repoData.ClosedIssues).toLocaleString());
$('#pullRequests').text(Number(repoData.PullRequests).toLocaleString());
$('#closedPullRequests').text(Number(repoData.ClosedPullRequests).toLocaleString());
$('#openPullRequests').text(Number(repoData.OpenPullRequests).toLocaleString());
$('#avgDaysToClosePRs').text(repoData.AvgDaysToClosePullRequests ? repoData.AvgDaysToClosePullRequests.toFixed(1).toLocaleString() : 0);
$('#avgDaysForFirstResponseToPRs').text(repoData.AvgDaysForFirstResponseToPullRequests ? repoData.AvgDaysForFirstResponseToPullRequests.toFixed(1).toLocaleString() : 0);
$('#prsClosedToday').text(repoData.PullRequestsClosedToday);
$('#prsOpenedToday').text(repoData.PullRequestsOpenedToday);
$('#avgDaysToCloseIssues').text(repoData.AvgDaysToCloseIssues ? repoData.AvgDaysToCloseIssues.toFixed(1).toLocaleString() : 0);
$('#avgDaysForFirstResponseToIssues').text(repoData.AvgDaysForFirstResponseToIssues ? repoData.AvgDaysForFirstResponseToIssues.toFixed(1).toLocaleString() : 0);
$('#openedIssuesToday').text(repoData.OpenedIssuesToday);
$('#closedIssuesToday').text(repoData.ClosedIssuesToday);
$('#commits').text(Number(repoData.Commits).toLocaleString());
$('#linesCommitted').text(Number(repoData.LinesCommitted).toLocaleString());
$('#commitsToday').text(repoData.CommitsToday);
$('#linesCommittedToday').text(Number(repoData.LinesCommittedToday).toLocaleString());
}
function displayChart(repoData, orgData) {
var repo = {
avgDaysToClosePRs: repoData.AvgDaysToClosePullRequests ? repoData.AvgDaysToClosePullRequests.toFixed(1).toLocaleString() : 0,
avgDaysForFirstResponseToPRs: repoData.AvgDaysForFirstResponseToPullRequests ? repoData.AvgDaysForFirstResponseToPullRequests.toFixed(1).toLocaleString() : 0,
avgDaysToCloseIssues: repoData.AvgDaysToCloseIssues ? repoData.AvgDaysToCloseIssues.toFixed(1).toLocaleString() : 0,
avgDaysForFirstResponseToIssues: repoData.AvgDaysForFirstResponseToIssues ? repoData.AvgDaysForFirstResponseToIssues.toFixed(1).toLocaleString() : 0
};
var org = {
avgDaysToClosePRs: orgData.AvgDaysToClosePullRequests ? orgData.AvgDaysToClosePullRequests.toFixed(1).toLocaleString() : 0,
avgDaysForFirstResponseToPRs: orgData.AvgDaysForFirstResponseToPullRequests ? orgData.AvgDaysForFirstResponseToPullRequests.toFixed(1).toLocaleString() : 0,
avgDaysToCloseIssues: orgData.AvgDaysToCloseIssues ? orgData.AvgDaysToCloseIssues.toFixed(1).toLocaleString() : 0,
avgDaysForFirstResponseToIssues: orgData.AvgDaysForFirstResponseToIssues ? orgData.AvgDaysForFirstResponseToIssues.toFixed(1).toLocaleString() : 0
}
c3.generate({
bindto: '#metricsChart',
data: {
x: 'x',
columns: [
['x', 'Avg days to close PRs', 'Avg days for first response to PRs', 'Avg days to close issues', 'Avg days for first response to open issues'],
['This repo', repo.avgDaysToClosePRs, repo.avgDaysForFirstResponseToPRs, repo.avgDaysToCloseIssues, repo.avgDaysForFirstResponseToIssues],
[orgData.OrgName + ' org', org.avgDaysToClosePRs, org.avgDaysForFirstResponseToPRs, org.avgDaysToCloseIssues, org.avgDaysForFirstResponseToIssues],
],
type: 'bar',
colors: {
'This repo': '#0078d7',
[orgData.OrgName + ' org']: '#ffb900'
}
},
axis: {
x: {
label: {
position: 'bottom'
},
type: 'category'
},
y: {
label: {
text: 'Days',
position: 'outermiddle'
}
}
}
});
}

26
views/js/search.js Normal file
Просмотреть файл

@ -0,0 +1,26 @@
var timer;
var inputQuery = $('#inputQuery');
inputQuery.on('keyup input', function () {
timer && clearTimeout(timer);
timer = setTimeout(updatePage, 5000);
});
$('#entitySearch').submit(function(event) {
updatePage();
event.preventDefault();
});
function updatePage() {
var searchVal = inputQuery.val().trim();
var currentUrl = window.location.href;
var newUrl = replaceUrlParam(currentUrl, 'q', searchVal);
window.location.href = newUrl;
}
// http://stackoverflow.com/questions/7171099/how-to-replace-url-parameter-with-javascript-jquery#20420424
function replaceUrlParam(url, paramName, paramValue) {
var pattern = new RegExp('\\b(' + paramName + '=).*?(&|$)');
if (url.search(pattern) >= 0) {
return url.replace(pattern, '$1' + paramValue + '$2');
}
return url + (url.indexOf('?') > 0 ? '&' : '?') + paramName + '=' + encodeURIComponent(paramValue);
}

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

@ -8,12 +8,16 @@ html(lang="en")
include head
body
include alerts
- var scheme = primaryAuthenticationScheme || (config ? config.authentication.scheme : null)
include nav
include breadcrumbs
if reposContext && site === 'github'
include reposToolbar
//-include breadcrumbs
// content
block content
// end of content
include footer
include insights
include insights
include ga

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

@ -11,61 +11,66 @@ block content
// - authenticated with AAD
div.container
div.row
div.col-md-7.col-lg-7
h1 Link your accounts
p.lead.
Enable self-service open source management by linking
your corporate &amp; social coding accounts
table.table
thead
tr
th GitHub Username
th
th #{config.companyName} Directory
tbody
tr
- gitAlertClass = config.authentication.scheme == 'github' ? '' : 'alert-success'
- aadAlertClass = config.authentication.scheme == 'aad' ? '' : 'alert-success'
td(class=gitAlertClass)= user.github.username
td
div.text-center
i.glyphicon.glyphicon-link
td(class=aadAlertClass)= user.azure.username
p By continuing, you agree:
ul
li My GitHub account is controlled by #{user.azure.username}
li My GitHub password is safe and secure
li I will enable two-factor authentication on my GitHub account
div.col-md-8.col-lg-8
form(method='post')
if graphUser && graphUser.mail
input(type='hidden', name='sam', value=graphUser.mail)
if isServiceAccountCandidate
h1 Create a service account link
p.lead Service accounts are often used for continuous integration, deployment and test systems
h5 Service account contact
p This account is a Service Account at #{config.brand.companyName}. Since many mail-enabled service accounts are not regularly monitored for communications, we need to record an e-mail address to associate with the maintainers of this account.
input(type='hidden', name='sa', value='1')
input.form-control(name='serviceAccountMail', type='text', placeholder='Discussion list, security group, or e-mail address of the primary maintainer')
h5 Link details
else
h1 Link your accounts
p.lead.
#{graphUser && graphUser.givenName ? graphUser.givenName + ', get' : 'Get'} access to
#{config.brand.companyName} repos and enable self-service tools by linking
your #{config.brand.companyName} &amp; GitHub accounts
table.table
thead
tr
th GitHub Username
th
th #{config.brand.companyName} Directory
tbody
tr
td
if user && user.github
= user.github.username
td
div.text-center
i.glyphicon.glyphicon-link
td
if user && user.azure
= user.azure.username
p By continuing, you agree the following are true:
ul
if isServiceAccountCandidate && user && user.azure
li This GitHub account is a service account, #{user.azure.username}
if user && user.azure
li This GitHub account is controlled by #{user.azure.username}
li The GitHub account's passwords and personal access tokens are safe and secure
li This account will use two-factor authentication on GitHub.com
if isServiceAccountCandidate
li The e-mail address(es) associated with this service account can be used to communicate with those controlling the account regarding policy, operations, and outages
p(style='margin-top:24px')
input.btn.btn-lg.btn-primary(type='submit', value='Link')
| &nbsp; &nbsp;
a.btn.btn-lg.btn-default(href='/signout') Cancel
div.col-md-5.col-lg-5
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
// These same resources appear on every single auth page footer, too.
h3 Open Source Resources
each categoryList, category in footres
h5= category
ul
each item in categoryList
li
a(href=item.link, target='_new')
= item.title + ' '
i.glyphicon.glyphicon-share-alt
p &nbsp;
h3 Your onboarding progress
h5
| Sign in with GitHub &amp; #{config.companyName} IT&nbsp;
| Sign in to your GitHub &amp; #{config.brand.companyName} accounts&nbsp;
i.glyphicon.glyphicon-ok
h5.text-primary
| Link your identity
| Link your accounts
h5
| Join your first GitHub organization
h5
@ -75,4 +80,21 @@ block content
h5
| Publish your membership <em>(optional)</em>
h5
| Join a team <em>(optional)</em>
| Join a team <em>(optional)</em>
div.col-md-4.col-lg-4
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
// These same resources appear on every single auth page footer, too.
h3 Open Source Resources
each categoryList, category in footres
h5= category
ul.list-unstyled
each item in categoryList
li
a(href=item.link, target='_new')
= item.title

24
views/linkConfirmed.pug Normal file
Просмотреть файл

@ -0,0 +1,24 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends layout
block content
//- This is a nice-to-have page that just gives positive acknowledgement of a link
div.container
h1 You're linked
p You have linked your corporate identity, #{ossLink.aadupn}, with your GitHub username, #{ossLink.ghu}.
a.btn.btn-huge.btn-success(href='/') Link OK
hr(style='margin-top:50px')
div(style='margin-bottom:150px')
h3 No longer need GitHub.com access?
p You can remove your link. You will also be removed from any of your corporate GitHub.com organization memberships.
p: a.btn.btn-sm.btn-danger(href='/link/remove') Unlink your accounts

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

@ -12,17 +12,31 @@ block content
div.container
h1 Please sign in with #{config.companyName} IT
h1 Please sign in with #{config.brand.companyName} IT
p Hey #{user.github.displayName || user.github.username}:
if user && user.github
p Hey #{user.github.displayName || user.github.username}:
p It looks like you have used a #{config.companyName} organization before, but this is the first time you are using the new open source portal.
p It looks like you have used a #{config.brand.companyName} organization before, but this is the first time you are using the new open source portal.
p We need you to quickly authenticate with Azure Active Directory and your corporate identity this one time before you can access the portal. This should only take a minute or so depending on whether your corporate account has multi-factor (MFA) authentication already.
p
strong Microsoft Account (MSA)/OrgID note:
| If you are currently signed into a Microsoft Account, this sign in process may not work. You may receive an error as we need you to sign in with the Microsoft IT tenant. If you're having problems, just open an InPrivate (IE), Incognito (Chrome), or Private Browsing (Safari) window and try there. Sorry for the trouble.
p This is also a good time to remind you of the policy and make sure the lawyers are happy.
p By continuing, you are accepting the following terms:
ul
li I understand the <a href="https://microsoft.sharepoint.com/sites/lcaweb/Home/Product-Development/Using-Open-Source-Software" target="_new">open source policy at Microsoft <i class="glyphicon glyphicon-share-alt"></i></a>.
li My password is safe, secure and smart.
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
a.btn.btn-primary(href='/signin/azure') Sign In to #{config.companyName}
a.btn.btn-primary(href='/signin/azure') Sign In to #{config.brand.companyName}
| &nbsp;
a.btn.btn-default(href='/signout') Cancel and Sign Out

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

@ -9,7 +9,7 @@ block content
div.container#top(style='margin-top:60px')
div.container#content
div.row
div.col-md-10
div.col-md-11
if messageTitle
p
em= messageTitle
@ -25,13 +25,18 @@ block content
p
pre= messageOutput
if messageLink && messageLinkTitle
p
br
a.btn.btn-primary(href=messageLink, target=messageLinkTarget || undefined)= messageLinkTitle
p
br
a.btn.btn-default(href='/')= buttonText || 'Home'
if config && config.corporate && config.corporate.portalAdministratorEmail
if config && config.brand && config.brand.supportMail
p.vertical-space
| &nbsp;
p.vertical-space
| If you have any questions, please ping &nbsp;
a.alert-link(href='mailto:' + config.corporate.portalAdministratorEmail)= config.corporate.portalAdministratorEmail
| If you have any questions, please ping&nbsp;
a.alert-link(href='mailto:' + config.brand.supportMail)= config.brand.supportMail

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

@ -7,12 +7,15 @@ extends layout
block content
div.container
h2 GitHub Cleanup
p.lead You need to unlink #{numberToRemove == 1 ? 'a' : numberToRemove} GitHub account#{numberToRemove == 1 ? '' : 's'}
p.
Please remove the accounts that you are not using for
corporate work at this time. Removed accounts
will lose access to any private repositories.
if enableMultipleAccounts === true
h2 Select your account
else
h2 GitHub cleanup
p.lead You need to unlink #{numberToRemove == 1 ? 'a' : numberToRemove} GitHub account#{numberToRemove == 1 ? '' : 's'}
p.
Please remove the accounts that you are not using for
corporate work at this time. Removed accounts
will lose access to any private repositories.
div.row
each column in linksForCleanupByColumn
div.col-sm-6.col-md-6.col-lg-6
@ -22,8 +25,11 @@ block content
h2= link.ghu
p GitHub Account
a.btn.btn-sm.btn-muted(href='https://github.com/' + link.ghu, target='_new')
| View #{link.ghu} GitHub Profile &nbsp;
i.glyphicon.glyphicon-share-alt
| View #{link.ghu} GitHub Profile
if enableMultipleAccounts === true
form(method='post').vertical-space
input(type='hidden', name='select', value=link.ghid)
input.btn-primary.btn-lg(class=buttonClass, type='submit', value=`Select ${link.ghu}`)
form(method='post').vertical-space
input(type='hidden', name='unlink', value=link.ghid)
- var isConfirming = confirming === link.ghid
@ -37,7 +43,7 @@ block content
| Linked&nbsp;
time(datetime=link.joinedDate.toISOString())= link.joinedDate.toDateString()
if config && config.corporate && config.corporate.portalAdministratorEmail
if config && config.brand && config.brand.supportMail
p.vertical-space
| If you have any questions, please ping &nbsp;
a.btn.btn-sm.btn-muted(href='mailto:' + config.corporate.portalAdministratorEmail)= config.corporate.portalAdministratorEmail
| If you have any questions, please ping&nbsp;
a.btn.btn-sm.btn-muted(href='mailto:' + config.brand.supportMail)= config.brand.supportMail

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

@ -10,7 +10,7 @@
mixin userTile(username, displayName, link, linkTitle, actionLink, action)
if username
a.btn.btn-sm.btn-muted(href=link, target='_new', title=linkTitle)= username
if displayName && displayName !== username
if displayName
a.btn.btn-sm.btn-muted-more(href=link, target='_new', title=linkTitle)= displayName
if action
a.btn.btn-sm.btn-white(href=actionLink, style='margin-left:10px')= action
@ -24,13 +24,13 @@ mixin userGitHub
h4 GitHub Account
if user && user.github
p
if user.github && user.github.avatarUrl
if user.github.avatarUrl
img(alt=user.github.displayName, src=user.github.avatarUrl + '&s=80', style='margin-right:10px;width:30px;height:30px', data-user=user.github.id)
+userTile(user.github.username, user.github.displayName || user.github.username, 'https://github.com/settings/profile', 'Click to edit your public GitHub profile', actionLink, action)
else
if scheme === 'github'
p
small Sign in or create your GitHub.com account to manage your #{config && config.companyName || 'corporate'} open source identity
small Sign in or create your GitHub.com account to manage your #{config && config.brand.companyName || 'corporate'} open source identity
p
a.btn.btn-sm.btn-primary(href='/signin/github') Sign In
@ -38,13 +38,13 @@ mixin userAzure
- var actionLink = scheme === 'github' ? '/link/update' : azureSignoutLink
- var action = scheme === 'github' ? 'Change' : 'Sign Out'
if user && user.azure
h4 #{config && config.companyName ? config.companyName : 'Corporate'} Identity
h4 #{config && config.brand.companyName ? config.brand.companyName : 'Corporate'} Identity
p
+userTile(user.azure.username, user.azure.displayName, '/settings', 'View your settings', actionLink, action)
else if scheme !== 'github'
h4 #{config && config.companyName ? config.companyName : 'Corporate'} Identity
h4 #{config && config.brand.companyName ? config.brand.companyName : 'Corporate'} Identity
p
small Sign in to manage your #{config && config.companyName || 'corporate'} open source identity
small Sign in to manage your #{config && config.brand.companyName || 'corporate'} open source identity
p
a.btn.btn-sm.btn-primary(href='/signin') Sign In

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

@ -10,8 +10,8 @@ block content
if twoFactorOff === true
if notValidated
h1 MFA is still not enabled for #{user.github.displayName || user.github.username}...
if notValidated && user.github
h1 2FA is still not enabled for #{user.github.displayName || user.github.username}...
else
h1 2FA is not enabled
@ -38,75 +38,14 @@ block content
li
a.btn.btn-default(href='/unlink') Cancel my corporate participation
p You can find out more about GitHub two-factor authentication online:
ul
li <a href="https://github.com/blog/1614-two-factor-authentication">GitHub Blog Post about 2FA</a>
li <a href="https://help.github.com/articles/about-two-factor-authentication/">GitHub 2FA Help</a>
hr
h2 Frequently Asked Questions
h3 I'm located overseas. What are my options for authenticating?
p GitHub supports some countries outside of the USA, but notably China is not included. If you are working in one of the countries that does not have SMS support from GitHub for MFA, you will need to use an Authenticator app that runs on your machine or smart phone. The app will provide the 2nd factor of authentication along with your password.
h3 What apps can I use for MFA?
p Most generic Authenticator apps should work. Make sure you trust the publisher. A starting point might be:
ul
li
p
a(href='http://www.windowsphone.com/en-us/store/app/authenticator/e7994dbc-2336-4950-91ba-ca22d653759b', target='_self') Authenticator by Microsoft for Windows Phone
br
small Known issues with GitHub, QR scanning does not work
li
p
a(href='https://itunes.apple.com/us/app/google-authenticator/id388497605', target='_self') Google Authenticator by Google for iPhone
br
small Works
li
p
a(href='https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2', target='_self') Google Authenticator by Google for Android
br
small Likely works. Not verified.
h3 Will my password still work in apps and clients like Git Bash?
p Once 2FA is enabled, you will no longer use your password when pushing or pulling changes from GitHub. Instead, on GitHub you will generate a Personal Access Token to be used in the same manner as a password.
h3 What is Multi-Factor Authentication (MFA)? What about Two-Factor Authentication (2FA)?
p Same things. Read more on <a href="http://en.wikipedia.org/wiki/Multi-factor_authentication" target="_self">Wikipedia</a>.
h3 Can I use the Azure AD app, "Azure Authenticator", with GitHub?
p Unfortunately not. You will need a different app for this.
h3 I don't have a smart phone. What can I do?
p There are some apps out there that support MFA for Windows and other operating systems. You may want to look into that.
h3 I've lost my backup codes and other information. Can you help?
p The multi-factor relationship for your GitHub account (#{user.github.username}) is managed entirely by GitHub. When you first setup MFA, they will offer to let you download or print backup codes. You should consider doing this and storing them in a safe place. GitHub may not be able to ever grant you access back to your account if you lose the backup information and the MFA information.
h3 The Microsoft Authenticator app for Windows Phone is not working well with GitHub and the QR code.
p This is a known issue. You need to manually enter the code inside the Microsoft app for Windows Phone authentication, there are bugs in the app parsing the values that GitHub provides. <strong>:-(</strong>
h3 Other questions?
p Please use the <em>Contact Administrators</em> in the footer of this page with other questions or suggested Q&A entries. We'll try to get them up here.
include twoFactorInstructions
else
h1 Two-factor security is enabled for #{user.github.displayName || user.github.username}
h1 Two-factor security is enabled
p.
Thanks for helping to keep the organization secure.
p
a.btn.btn-primary(href=org.baseUrl) Go to the #{org.name} portal

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

@ -13,17 +13,19 @@ block content
each entry in teamResponsibilities
h2(style='padding-bottom: 16px')
=entry.type === 'repo' ? 'New Repository' : 'Join a team'
|
| &nbsp;
small Permission Request
div.row
div.col-md-5.col-lg-5
form(method='post', action='/' + entry._teamInstance.org.name + '/teams/' + entry._teamInstance.name + '/approvals/' + entry.RowKey)
p
a.btn.btn-sm.btn-muted(href='https://github.com/' + entry._teamInstance.org.name + '/' + entry._teamInstance.org.getWorkflowRepository().name + '/issues/' + entry.issue, target='_new')= entry.issue
| &nbsp;
//-if entry.issue
//- NOTE: Commenting out GitHub links with approval repos, since they are being deprecated internally and this is a quick fix
a.btn.btn-sm.btn-muted(href='https://github.com/' + entry._teamInstance.org.name + '/' + entry._teamInstance.org.getWorkflowRepository().name + '/issues/' + entry.issue, target='_new')= entry.issue
| &nbsp;
a.btn.btn-sm.btn-muted(href='/' + entry._teamInstance.org.name + '/teams/' + entry._teamInstance.name + '/approvals/' + entry.RowKey)
i.glyphicon.glyphicon-zoom-in
|
| &nbsp;
| View Detailed Request Page
if entry.active === true
p
@ -64,7 +66,8 @@ block content
each myRequest in usersRequests
div.row(style='margin-top:24px')
div.col-md-5.col-lg-5
if myRequest._teamInstance
//-if myRequest._teamInstance && myRequest.issue
//- NOTE: Commenting out GitHub links with approval repos, since they are being deprecated internally and this is a quick fix
p
a.btn.btn-sm.btn-muted(href='https://github.com/' + myRequest._teamInstance.org.name + '/' + myRequest._teamInstance.org.getWorkflowRepository().name + '/issues/' + myRequest.issue, target='_new') Tracking Issue ##{myRequest.issue}
form(method='post', action='/approvals/' + myRequest.RowKey + '/cancel')

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

@ -18,52 +18,40 @@ block content
div.container
div.row(style='margin-top:16px')
div.col-md-3.col-lg-3
div.metro-box(class=accountInfo.isMembershipPublic === true ? 'ms-green' : 'ms-yellow')
a(href=org.baseUrl + 'membership')
if accountInfo.isMembershipPublic === true
h3 Public Member
else
h3 Concealed
p= org.name.toUpperCase() + ' ORGANIZATION'
div.col-md-3.col-lg-3
div.metro-box.ms-blue
a(href=org.baseUrl + 'teams')
h3 Join a team
p REQUEST ACCESS
div.col-md-3.col-lg-3
div.metro-box.ms-purple
a(href='https://github.com/orgs/' + org.name + '/new-team', target='_new')
h3 Create a team
p NEW TEAM
div.col-md-3.col-lg-3
div.metro-box.ms-dark-blue
a(href=org.baseUrl + 'new-repo')
h3 Create a repo
p REQUEST A NEW REPO
div.row(style='margin-top:16px')
p NEW REPO
div.col-md-3.col-lg-3
if accountInfo.isMembershipPublic === true
p Your membership is public and appears on your GitHub profile.
else
p Consider <a href="#{org.baseUrl}membership">taking your membership public</a> to help support our open source cause!
div.metro-box.ms-blue
a(href=org.baseUrl + 'teams?set=available')
h3 Join a team
p VIEW TEAMS
div.col-md-3.col-lg-3
p Request to join a team. Teams have permissions to a set of repos.
div.metro-box.ms-purple
a(href='https://github.com/orgs/' + org.name + '/new-team', target='_new')
h3 Add a team
p NEW TEAM
div.col-md-3.col-lg-3
p Create a team for new projects / assigning group permissions.
div.col-md-3.col-lg-3
p Request a new repo for your project.
div.metro-box(class=accountInfo.isMembershipPublic === true ? 'ms-green' : 'ms-yellow')
a(href=org.baseUrl + 'membership')
if accountInfo.isMembershipPublic === true
h3 Public member
else
h3 Concealed
p= 'PUBLIC MEMBERSHIP'
if accountInfo.isSudoer
h2 SUDO
p Your account has sudoer rights for this organization. You have additional capabilities enabled to help ensure the health of the organization, its teams and repos. Please use care.
if accountInfo.teamsMaintained && accountInfo.teamsMaintained.length && accountInfo.teamsMaintained.length > 0
if accountInfo.organizationOverview.teams.maintainer && accountInfo.organizationOverview.teams.maintainer.length
if accountInfo.pendingApprovals && accountInfo.pendingApprovals.length && accountInfo.pendingApprovals.length > 0
h2 Pending Approvals
p
a.btn.btn-default(href='./approvals/') See all pending #{org.name} approvals (#{accountInfo.pendingApprovals.length})
if accountInfo.teamsMaintained
if accountInfo.organizationOverview.teams.maintainer
h2.capitalize #{org.name} Teams You Maintain
script(type='text/javascript').
function initializeManageFilter() {
@ -89,7 +77,7 @@ block content
// th Organization
th.thirtypercent Manage
tbody
each team in accountInfo.teamsMaintained
each team in accountInfo.organizationOverview.teams.maintainer
tr
td
a.btn.btn-sm.btn-muted(href=org.baseUrl + 'teams/' + team.slug + '/')= team.name
@ -104,12 +92,12 @@ block content
p
a.btn.btn-default.btn-sm(href=org.baseUrl + 'membership') Learn more
h1.capitalize #{org.name} Team Memberships
h2 Team Memberships
if accountInfo.teamsMaintainedHash
p Here are teams that you are a member of but not a maintainer of.
p Here are teams that you are a member of but do not maintain.
if accountInfo.userTeamMemberships && accountInfo.userTeamMemberships.length && accountInfo.userTeamMemberships.length > 0
if accountInfo.organizationOverview.teams.member && accountInfo.organizationOverview.teams.member.length
script(type='text/javascript').
function initializeMembershipFilter() {
var inputMembershipFilter = $('#membership-filter');
@ -133,26 +121,22 @@ block content
th.thirtypercent View
tbody
- var everyoneTeamId = org.inner.settings.teamAllMembers
each team in accountInfo.userTeamMemberships
each team in accountInfo.organizationOverview.teams.member
if team.id && accountInfo.teamsMaintainedHash && accountInfo.teamsMaintainedHash[team.id] !== undefined
// Skipping this team since they are already maintaining it
else
tr
td
a.capitalize.btn.btn-sm.btn-muted(href='https://github.com/orgs/' + team.org.name + '/teams/' + team.slug, target='_new')= team.name
a.capitalize.btn.btn-sm.btn-muted(href='/' + team.organization.login + '/teams/' + team.slug, target='_new')= team.name
td.thirtypercent
p
if everyoneTeamId == team.id
a.btn.btn-default.btn-sm(href=team.org.baseUrl + 'leave') Leave Organization
else
a.btn.btn-default.btn-sm(href='https://github.com/orgs/' + team.org.name + '/teams/' + team.slug, target='_new')
| Open on GitHub
i.glyphicon.glyphicon-share-alt
a.btn.btn-default.btn-sm(href='/' + team.organization.login + '/teams/' + team.slug, target='_new')
| Open on GitHub
else
//-p You are not currently a member of any GitHub teams that grant you permission to specific repositories. You may be pre-approved to join teams.
p You are not currently a member of any GitHub teams for #{org.name}. <em>This view is cached.</em>
p
a.btn.btn-default(href=org.baseUrl + 'teams')= (accountInfo.userTeamMemberships && accountInfo.userTeamMemberships.length && accountInfo.userTeamMemberships.length > 0) ? 'Join another team' : 'Join a team'
a.btn.btn-default(href=org.baseUrl + 'teams')= (accountInfo.organizationOverview.teams.member && accountInfo.organizationOverview.teams.member.length) ? 'Join another team' : 'Join a team'
if accountInfo.orgUser
hr
@ -166,8 +150,7 @@ block content
h4= orgUser.login
p(style='margin-top:18px')
a.btn.btn-sm.btn-muted(href='https://github.com/' + org.name, target='_new')
| View on GitHub
i.glyphicon.glyphicon-share-alt
| Open on GitHub
div.col-md-8.col-lg-8.col-md-offset-1.col-lg-offset-1
div.row
div.col-md-6.col-lg-6
@ -200,36 +183,34 @@ block content
p= org.inner.settings.organizationPurpose
if org.inner.settings.type
h6 Supported Repository Types
ul
li Public Repositories
if org.inner.settings.type == 'publicprivate'
li Private Repositories
ul.list-unstyled
li Public
if org.inner.settings.type == 'publicprivate' || org.inner.settings.type == 'private'
li Private
div.col-md-6.col-lg-h6
h6 Repositories
if orgUser.otherFields.public_repos
h2
= orgUser.otherFields.public_repos + ' '
small Open Source
//- small Public
small Public
if orgUser.otherFields.total_private_repos
h2
= orgUser.otherFields.total_private_repos + ' '
small Private
hr
h6 #{config.companyName} Investment
h6 Remaining Repositories
if orgUser.otherFields.plan && orgUser.otherFields.plan.private_repos
h2.capitalize
= orgUser.otherFields.plan.name + ' '
small Plan
h2
= (orgUser.otherFields.plan.private_repos - orgUser.otherFields.total_private_repos) + ' '
small Remaining Private Repos
= (orgUser.otherFields.plan.private_repos - orgUser.otherFields.total_private_repos) + ' '
small Private
h2
| &infin;&nbsp;
small Remaining Public Repos
small Public
if org.inner.settings.trainingResources
- var tr = org.inner.settings.trainingResources
@ -246,7 +227,7 @@ block content
if resource.text
br
small= resource.text
hr
hr
p
a.btn.btn-default(href=org.baseUrl + 'leave') Leave #{org.name}
a.btn.btn-default(href=org.baseUrl + 'leave') Leave #{org.name}

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

@ -13,16 +13,16 @@ block content
h1 We'll miss you!
p.lead Are you sure that you want to leave the #{org.name} organization on GitHub?
p Please carefully review this page. Data loss is possible if you have forks of private organization repos.
p Please carefully review this page. <strong>Data loss is possible</strong> if you have forks of private organization repos.
p
ul
li Your GitHub account #{user.github.username} will be dropped from the org via the GitHub API immediately following this page
li Any private forks of repos from #{org.name} will be deleted by GitHub
li Any work done in a private fork of repos from #{org.name} will be lost. Data loss may happen.
li GitHub account #{user.github.username} will be dropped from the org immediately
li Your private forks of repos from #{org.name} will be deleted by GitHub
li Work done in a private fork of a repo from #{org.name} will be lost
form(method='post')
p(style='margin-top:36px')
input.btn.btn-primary(type='submit', value='Remove ' + user.github.username + ' from ' + org.name)
input.btn.btn-primary.btn-lg(type='submit', value='Remove ' + user.github.username + ' from ' + org.name)
| &nbsp;&nbsp;&nbsp;
a.btn.btn-default(href=org.baseUrl) Cancel
a.btn.btn-default.btn-lg(href=org.baseUrl) Cancel

12
views/org/newRepoSpa.pug Normal file
Просмотреть файл

@ -0,0 +1,12 @@
extends ../layout
block js
link(href='/client/dist/assets/vendor.css', rel='stylesheet')
//- script(type='text/javascript', src='/js/jquery.min.js')
script(src='/client/dist/assets/vendor.js')
script(src='/client/dist/assets/client.js')
script(type='text/javascript', src='/js/bootstrap.min.js')
script(type='text/javascript', src='/js/jquery.timeago.js')
block content
#ember-app

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

@ -11,9 +11,37 @@ block js_doc_ready
| $('#openInviteButton2').click(inviteInterfaceUpdateOnClick);
block content
div.container
.container
if writeOrgFailureMessage
.alert.alert-danger
if showTwoFactorWarning
h2 Two-factor authentication is required to continue
else
h2 GitHub API warning
p.lead= writeOrgFailureMessage
if state === 'pending' && showTwoFactorWarning
p(style='margin-top:24px')
| This organization has enabled GitHub's&nbsp;
a(href='https://help.github.com/articles/requiring-two-factor-authentication-in-your-organization/', target='_new') two-factor authentication requirement
|. As a result, you cannot join the org until you&nbsp;
a(href='https://github.com/settings/two_factor_authentication/configure') turn on two-factor auth&nbsp;
| with GitHub.
form(method='post')
ul.list-inline
li
a.btn.btn-primary(href='https://github.com/settings/two_factor_authentication/configure', target='_new') Configure 2FA on GitHub
li
input.btn.btn-default(type='submit', value='Validate 2FA and continue', title='Pending - you have already been invited')
include twoFactorInstructions
else if state == 'pending'
if showApplicationPermissionWarning
// Need to figure out what the right message is to show here
if state == 'pending'
h1 Action Required: You've been manually invited!
p.lead GitHub has sent an invitation to <em>#{org.name}</em>.
@ -48,45 +76,41 @@ block content
else
div.row
div.col-md-6.col-lg-6
h1
if onboarding
| Let's join #{org.name}!
else
| Would you like to join #{org.name}?
if user && user.github && user.githubIncreasedScope
div.col-md-8.col-lg-8
h1 Want to join #{org.name}?
if hasIncreasedScope
form(method='post')
p(style='margin-top:24px')
input.btn.btn-primary.btn-huge(type='submit', value='Join ' + org.name + ' now')
input.btn.btn-primary.btn-huge(type='submit', value='Join ' + org.name)
else
p.lead Quickest way: authorize this portal to join on my behalf
p
a.btn.btn-primary.btn-huge(href='/' + org.name + '/join/express' + (onboarding ? '?onboarding=' + onboarding : ''))
| Join #{org.name} now
p.lead Quick way: Authorize us to join on your behalf
p.
Authorize this site to use the
<a href="https://developer.github.com/v3/oauth/#scopes" target="_new"><code>org:write</code></a>
scope to automate the join process.
//-<em>The additional scope will be removed the next time you sign in to this portal.</em>
permission and immediately join the organization.
p
a.btn.btn-primary.btn-huge(href='/' + org.name + '/join/express' + (onboarding ? '?onboarding=' + onboarding : ''))
| Join #{org.name}
hr
p.lead Manual way: Follow this process
ul
li We'll explain how the GitHub invitation works.
li An email invitation will be sent to you from GitHub.
li You accept the invitation in on GitHub.com.
li You come back to this site and continue onboarding.
form(method='post')
p
input.btn.btn-default.btn(type='submit', value='Join ' + org.name + ' (Manual)')
p.
This alternate path will not increase the scope of permissions granted to this site. Instead, the process requires many manual steps:
ul
li An invitation will be sent from GitHub
li On the next page we'll explain how the GitHub invitation works
li You will accept the invitation on the GitHub.com web site
li We'll give you a chance to request to join teams in the organization
input.btn.btn-muted-more.btn-lg(type='submit', value='Manually Join ' + org.name)
if onboarding
p &nbsp;
hr
h3 Your onboarding progress
h5
| Sign in with GitHub &amp; #{config.companyName}&nbsp;
| Sign in to your GitHub &amp; #{config.brand.companyName} accounts&nbsp;
i.glyphicon.glyphicon-ok
h5
| Link your identity&nbsp;
| Link your accounts&nbsp;
i.glyphicon.glyphicon-ok
h5.text-primary
| Join your first GitHub organization
@ -99,7 +123,7 @@ block content
h5
| Join a team <em>(optional)</em>
div.col-md-6.col-lg-6
div.col-md-4.col-lg-4
if orgUser
p
img.img-thumbnail.img-responsive(src=orgUser.avatar(400), alt=(orgUser.name || orgUser.login))
@ -107,8 +131,7 @@ block content
h4= orgUser.login
p(style='margin-top:18px')
a.btn.btn-sm.btn-muted(href='https://github.com/' + org.name, target='_new')
| View on GitHub
i.glyphicon.glyphicon-share-alt
| Open on GitHub
hr
div.row
@ -142,19 +165,16 @@ block content
p= org.inner.settings.organizationPurpose
if org.inner.settings.type
h6 Supported Repository Types
ul
li Public Repositories
if org.inner.settings.type == 'publicprivate'
li Private Repositories
//-if org.inner.settings.type == 'publicprivate'
p This organization has a billing relationship on behalf of #{config.companyName} to support private repos designated for open source use.
ul.list-unstyled
li Public
if org.inner.settings.type == 'publicprivate' || org.inner.settings.type == 'private'
li Private
div.col-md-6.col-lg-h6
h6 Repositories
if orgUser.otherFields.public_repos
h2
= orgUser.otherFields.public_repos + ' '
small Open Source
small Public
//- small Public
if orgUser.otherFields.total_private_repos
h2
@ -162,14 +182,14 @@ block content
small Private
hr
h6 #{config.companyName} Investment
h6 Remaining Repositories
if orgUser.otherFields.plan && orgUser.otherFields.plan.private_repos
h2.capitalize
h2
= orgUser.otherFields.plan.name + ' '
small Plan
h2
= (orgUser.otherFields.plan.private_repos - orgUser.otherFields.total_private_repos) + ' '
small Remaining Private Repos
small Private
h2
| &infin;&nbsp;
small Remaining Public Repos
small Public

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

@ -11,30 +11,31 @@ block content
div.container
div.row
div.col-lg-8.col-md-8.col-sm-8
h1 Let's review your public profile
h1 Is your GitHub profile professional?
if onboarding
p.lead Since you're onboarding to #{org.name} for the first time, this is the perfect time to quickly think about this.
p Your interactions in public open source repos (commenting on issues, creating and working with pull requests, contributing source) will be associated with your public GitHub profile.
p With the company's open source and social media policies in mind, consider the answer to this question: "Is my profile professional?"
p.lead Since you've just linked your #{config.brand.companyName} and GitHub accounts, it's a perfect time to think about how you show up in public on GitHub.
p Your interactions in public open source repos (commenting on issues, creating and working with pull requests, contributing source) are all associated with your public GitHub profile. With #{config.brand.companyName}'s open source and social media policies in mind, consider the these questions:
ul
li Are you using the name you use professionally?
li Have you included #{config.companyName} in your profile?
li Have you identified #{config.brand.companyName} as your company?
li Have you included an e-mail address?
li Have you replaced the default GitHub-generated avatar graphic with a professional, smart, acceptable profile avatar?
p(style='margin-top:24px')
a.btn.btn-primary(href=org.baseUrl + (onboarding ? 'membership?onboarding=' + onboarding : 'membership')) Continue
li Do you have a professional, smart profile avatar?
p &nbsp;
p
a.btn.btn-primary.btn-lg(href=org.baseUrl + (onboarding ? 'membership?onboarding=' + onboarding : 'membership')) Continue
| &nbsp;&nbsp;
a.btn.btn-default(href='https://github.com/settings/profile', target='_new')
| Edit your profile in a new tab&nbsp;
i.glyphicon.glyphicon-share-alt
a.btn.btn-default.btn-lg(href='https://github.com/settings/profile', target='_new')
| Edit your profile on GitHub
if onboarding
p &nbsp;
hr
h3 Your onboarding progress
h5
| Sign in with GitHub &amp; #{config.companyName}&nbsp;
| Sign in to your GitHub &amp; #{config.brand.companyName} accounts&nbsp;
i.glyphicon.glyphicon-ok
h5
| Link your identity&nbsp;
| Link your accounts&nbsp;
i.glyphicon.glyphicon-ok
h5
| Join your first GitHub organization&nbsp;
@ -55,8 +56,16 @@ block content
h4 YOUR GITHUB PROFILE
p
img.img-thumbnail(style='max-width:200px', src=userProfile.avatar(400), alt=(userProfile.name || userProfile.login))
h3= userProfile.name
h4= userProfile.login
span
p
| GitHub username
br
strong= userProfile.login
span
p
| Name
br
strong= userProfile.name
span(style=userProfileWarnings.company)
p
| Company
@ -88,5 +97,4 @@ block content
strong= userProfile.otherFields.blog
p(style='margin:16px 0')
a.btn.btn-default.btn-sm(href='https://github.com/settings/profile', target='_new')
| Edit your profile in a new tab&nbsp;
i.glyphicon.glyphicon-share-alt
| Edit your profile on GitHub

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

@ -11,17 +11,15 @@ block content
if publicMembership
h1
| Thanks for supporting #{org.name}
p.lead Your membership is currently public.
p If you conceal your membership, you will not appear on the #{org.name} list of members nor be counted in the public membership count.
p.lead Your membership is currently public
p If you conceal your membership, you won't appear in the #{org.name} member list or count.
else
h1 Would you like to publish your #{org.name} org membership?
h1 Want to publish your #{org.name} org membership?
p.lead Show your support for #{config.brand.companyName} open source!
p Publicizing your org memberships is great for building community and reputation. If you to make your membership public, GitHub shows the "#{org.name}" avatar on <a href="https://github.com/#{user.github.username}" target="_new">your public GitHub profile</a> and shows you on the <a href="https://github.com/orgs/#{org.name}/people" target="_new">members page for #{org.name}</a>.
if user && user.github.increasedScope === true
p &nbsp;
if !publicMembership
p.lead Show your support for #{config.companyName} open source!
p If you want to make your membership public, GitHub will show the "#{org.name}" organization on your public GitHub profile at <a href="https://github.com/#{user.github.username}" target="_new">https://github.com/#{user.github.username}</a>.
p &nbsp;
form(method='post')
p
input.btn.btn-lg.btn-primary(type='submit', value=publicMembership ? 'Conceal my membership' : 'Make my membership public', name=publicMembership ? 'conceal' : 'publicize')
@ -36,26 +34,45 @@ block content
a.btn.btn-default.btn-lg(href=org.baseUrl) Cancel
else
p If you make your membership public, others in the worldwide open source community will see you listed on the page for #{org.name} and your personal GitHub profile page will show the #{org.name} avatar.
h2 Authorize #{org.name} to publish your organization membership
p Authorize us to get permission from GitHub to update your organization status
p.lead Quick way: Authorize us to publish on your behalf
p.
Temporarily authorize this site to have
<a href="https://developer.github.com/v3/oauth/#scopes" target="_new"><code>write:org</code></a>
permissions and immediately publish your org membership.
p
a.btn.btn-primary(href='/signin/github/increased-scope') Authorize additional permissions for #{org.name} with GitHub
a.btn.btn-primary.btn-lg(href='/signin/github/increased-scope') Publish Membership
if (!(onboarding || joining))
| &nbsp; &nbsp;
a.btn.btn-default(href=org.baseUrl) Cancel
if onboarding || joining
h2 Keep your membership private
p You can always change your mind from the organization portal start page.
p.lead Manual way: Follow this process
ul
li Head over to the <a href="https://github.com/orgs/#{org.name}/people">#{org.name} list of people</a>.
li Find yourself in the list and change the Public/Private setting.
p
a.btn.btn-default(href=org.baseUrl + 'teams' + (onboarding ? '?onboarding=' + onboarding : '')) Keep my membership private
a.btn.btn-default.btn-lg(href=org.baseUrl + 'teams' + (onboarding ? '?onboarding=' + onboarding : '')) Continue without publishing
if onboarding
p &nbsp;
hr
h4 About this additional GitHub authorization
p This open source portal is designed to use the bare minimum of <a href="https://developer.github.com/v3/oauth/#scopes" target="_new">GitHub OAuth scopes</a>. To change your public membership, we need to temporarily increase the scope to the <code>write:org</code> scope that enables publicizing and unpublicizing your membership.
p If you would rather not grant the additional scope, you can also modify your organization membership status manually at
a(href='https://github.com/orgs/' + org.name + '/people?query=' + theirUsername, target='_new') https://github.com/orgs/#{org.name}/people?query=#{theirUsername}
p The next time you sign in to use this portal, the expanded scope will be removed.
h3 Your onboarding progress
h5
| Sign in to your GitHub &amp; #{config.brand.companyName} accounts&nbsp;
i.glyphicon.glyphicon-ok
h5
| Link your accounts&nbsp;
i.glyphicon.glyphicon-ok
h5
| Join your first GitHub organization&nbsp;
i.glyphicon.glyphicon-ok
h5
| Multifactor security checkup&nbsp;
i.glyphicon.glyphicon-ok
h5
| Profile review&nbsp;
i.glyphicon.glyphicon-ok
h5.text-primary
| Publish your membership <em>(optional)</em>
h5
| Join a team <em>(optional)</em>

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

@ -1,48 +0,0 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../../layout
block content
div.container
h1 #{repo.name} Teams
//- At this time we do not differentiate between secret and visible teams.
p This page can help you identify the team(s) that you may need to join to work with the "#{repo.name}" repo on GitHub.
if teams && teams.length && teams.length > 0
- var currentPermissionType = ''
each team in teams
if currentPermissionType !== team.permission
if currentPermissionType !== ''
hr
h2.capitalize= team.permission
- currentPermissionType = team.permission
if team.permission == 'admin'
blockquote Members of these teams have complete control over the repo including the ability to delete, rename, modify collaborators, take public, and manage web hooks and other settings.
else if team.permission == 'pull'
blockquote Standard access, members are able to clone & pull from this repo, as well as submit pull requests.
else if team.permission == 'push'
blockquote Write access for accepting pull requests.
h4.capitalize= team.name
if team.description
p
small= team.description
p
- var availableTeam = team
if availableTeam._hack_isMember === true
if userTeamsMaintainedById && userTeamsMaintainedById[availableTeam.id]
a.btn.btn-sm.btn-primary(href='/' + availableTeam.org.name + '/teams/' + availableTeam.slug) Manage this team
else
a.btn.btn-sm.btn-muted(href='/' + availableTeam.org.name + '/teams/' + availableTeam.slug + (isSudoer ? '' : '/join')) Already a member
else
if isSudoer
a.btn.btn-muted.btn-sm(href='/' + availableTeam.org.name + '/teams/' + availableTeam.slug) Manage as sudoer
| &nbsp;
a.btn.btn-default.btn-sm(href='/' + availableTeam.org.name + '/teams/' + availableTeam.slug + '/join') Request to join
else
p No teams manage this repo.

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

@ -1,58 +0,0 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../layout
block js_doc_ready
| if (initializeRepoFilter) { initializeRepoFilter() }
block content
div.container
h1 #{org.name} Repositories
p This page can help you identify the team(s) that you may need to join to work with a particular repo. Press "Explore Teams" for any given repo to look up the team(s) that have rights to work with the repo and then request access.
script(type='text/javascript').
function initializeRepoFilter() {
var inputManageFilter = $('#manage-filter');
if (inputManageFilter) {
inputManageFilter.keyup(function () {;
$.uiTableFilter($('table#repos-table'), this.value, ['Repo', 'Description']);
});
}
}
table.table#repos-table
thead
tr
th(colspan='3')
form#manage-repos-filter-form
input.form-control#manage-filter(name='filter', placeholder='Filter repos', type='text')
th
p
i.glyphicon.glyphicon-search
tr
th.thirtypercent Repo Name
th State
th Description
th Actions
tbody
each repo in repos
tr
td
p
a.btn.btn-sm.btn-muted(href=repo.html_url, target='_new')
= repo.name
|
i.glyphicon.glyphicon-share-alt
td
p
a.btn.btn-sm(class=repo.private === true ? 'alert-danger' : 'alert-success', target='_new', href=repo.html_url)= repo.private === true ? 'Private' : 'Open Source'
td
p= repo.description
td
p
a.btn.btn-default.btn-sm(href='/' + repo.org.name + '/repos/' + repo.name + '/teams') Find / Join Teams

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

@ -6,101 +6,205 @@
extends ../layout
block js_doc_ready
| function setVisibility(element, attribute, target) {
| if ($(element).attr(attribute) == 'true') {
| $(element).bind('click', function() { $(target).show({ duration: 200 }); });
| } else {
| $(element).bind('click', function() { $(target).hide({ duration: 200 }); });
| }
| }
| var allLicenses = $('input[name="license"]');
| if(allLicenses.length > 0){ $(allLicenses[0]).attr('checked','checked');};
| var allApprovalTypes = $('input[name="approvalType"]');
| if (allApprovalTypes.length > 0) {
| allApprovalTypes.each(function() {
| setVisibility(this, 'url-required', '#approvalUrl');
| setVisibility(this, 'exemption-details-required', '#exemption-details');
| });
| $(allApprovalTypes[0]).trigger('click');
| }
| var validatePermissions = function (){
| var message = 'You must select at least one write or admin team. Otherwise you will be unable to use your repo once created!';
each selectTeam in selectTeams
| var itemValue = $('#existingTeamPermission#{selectTeam.number}').val();
| if (itemValue == 'admin' || itemValue == 'push') { message = null; }
if selectTeams
each selectTeam in selectTeams
| var itemValue = $('#existingTeamPermission#{selectTeam.number}').val();
| if (itemValue == 'admin' || itemValue == 'push') { message = ''; };
| var selectedApprovalType = $('input[name="approvalType"]:checked');
| if($(selectedApprovalType).attr('url-required') == 'true')
| { var pattern = new RegExp($(selectedApprovalType).attr('url-format'));
| var isMatch = pattern.test($('#inputApprovalUrl').val());
| if(isMatch == false){
| message += (message ? "\n" : "") + "Invalid Business Approval Url.";
| }
| }
| return message;
| };
| $('#permissionsForm').on('submit', function(e) { e.preventDefault(); var message = validatePermissions(); if (!message) { this.submit(); } else { alert(message); } });
| var teams = [null,
if teams
each team in teams
| { value: '#{team.id}', label: '#{team.name}'},
| ];
block content
div.container
h1 Request a new #{org.name} repo
form.form-horizontal#permissionsForm(method='post')
h5 Name
if orgConfig.createReposDirect === true
p.lead Your organization has not yet onboarded to repo creation inside this portal
p At this time repositories need to be created directly on GitHub.com. Only owners or those with specific permissions to create repositories will be able to do this.
p Please reach out to an organization owner if you do not have permission and need a repo.
p
input.form-control#inputGitHubName(type='text', placeholder='Repo Name (no spaces)', name='name')
h5 Description
p
input.form-control#inputGitHubName(type='text', placeholder='Description for the public', name='description')
a.btn.btn-lg.btn-primary(href='https://github.com/organizations/' + org.name + '/repositories/new', target='_new')
| Go to GitHub repo create page
h4 Business Justification and Open Source Approval
p Please provide more information about your request, including business justification and the context of your anticipated involvement.
p
small This request and your justification note will be stored for historical reasons as long as you maintain access to the team, so consider that your request may be viewed by engineering managers, directors and CVPs as they review the open source activities and compliance goals that are in place.
p
textarea.form-control(rows=3, name='justification', placeholder='Justification, open source approval information, and/or context for team maintainers and leadership.')
h4 Initial Visibility
p As the team maintainer, you can take your repo "public" using this same portal site at any time in the future.
div.form-group
span.col-sm-2.control-label Repo Visibility
div.col-sm-10
if allowPrivateRepos === true
p
input(name='visibility', type='radio', value='private', checked='checked')
|
| Private
p
input(name='visibility', type='radio', value='public')
|
| Public
else
p
input(name='visibility', type='radio', value='public', checked='checked', disabled='disabled')
|
| Public
h4 Teams and Permissions
p Teams contain specific permissions per repo. For as many teams as are needed, please select the team and maximum permission level for this repo.
p If you need new teams (for write access), create them before submitting this request. Teams can be created directly on GitHub at <a href="https://github.com/orgs/#{orgName}/new-team" target="_new">https://github.com/orgs/#{orgName}/new-team</a>.
div.container
input(type='hidden', name='teamCount', value=selectTeams.length)
each selectTeam in selectTeams
div.row
div.col-sm-12.col-md-12.col-lg-12
if selectTeam.id && selectTeam.info
h5
| Recommended Team
|
small= selectTeam.name
p= selectTeam.info
else
h5 Optional Team ##{selectTeam.number}
div.row
div.col-sm-7.col-md-7.col-lg-7
p
select.form-control(name='existingTeam' + selectTeam.number)
option(value=0, selected=selectTeam.id ? 'selected' : undefined) None
each team in teams
option(value=team.id, selected=team.id == selectTeam.id ? 'selected' : undefined)= team.name
div.col-sm-5.col-md-5.col-lg-5
p
select.form-control(name='existingTeamPermission' + selectTeam.number, id='existingTeamPermission' + selectTeam.number)
option(value='pull', selected='selected') Read (Pull, Fork)
option(value='push') Write (Push, Accept PRs)
option(value='admin') Manage (Web Hooks, Outside Collaborators, Settings)
if approvers
h4 Request Approver#{approvers.length > 1 ? 's' : ''} for #{org.name}
p Repo decisions for this organization are made by the following employee#{approvers.length > 1 ? 's' : ''}:
else
form.form-horizontal#permissionsForm(method='post')
h4 Name
p
for teamMember in approvers
span.person-tile
if teamMember.avatar()
img(alt=teamMember.login, src=teamMember.avatar('80'), style='margin-right:10px;width:20px;height:20px', width=20, height=20)
a.btn.btn-sm.btn-muted(href='https://github.com/' + teamMember.login, title=teamMember.id, target='_new')= teamMember.login
if teamMember.contactEmail()
a.btn.btn-sm.btn-muted-more(href='mailto:' + teamMember.contactEmail())= teamMember.contactName()
input.form-control#inputGitHubName(type='text', placeholder='Repo Name (no spaces)', name='name')
h4 Description
p
input.form-control#inputGitHubName(type='text', placeholder='Public-facing description', name='description')
h4 Language
p Choose language-specific .gitignore file
div
select.form-control(name='language')
option(value='', selected='selected') None
each language in languages
option(value=language)= language
if templates
h4 License &amp; template
p Each open source repo must have an open source license agreed to by your business and legal team.
each eachLicense in templates
div
label
input(type='radio',name='license',value=eachLicense.name)
span
= ' ' + eachLicense.name
if eachLicense.description
= ': ' + eachLicense.description + ' '
if eachLicense.legalEntities
= ' (' + eachLicense.legalEntities.join(' or ') + ' legal entity)'
if approvalTypes
h4 Approval Type
p GitHub is our location for doing open source work. All repos must have a corresponding approval (or exemption) for working in the open. One approval can be used to create multiple repos as long as their scopes match.
each eachApprovalType in approvalTypes
div
label
input(type='radio', name='approvalType', value=eachApprovalType.value, url-required=eachApprovalType.urlRequired ? 'true' : undefined, url-format=eachApprovalType.format, exemption-details-required=eachApprovalType.exemptionDetailsRequired ? 'true' : undefined)
span &nbsp;#{eachApprovalType.value}
div#approvalUrl.col-sm-12.col-md-12.col-lg-12
p
input.form-control#inputApprovalUrl(type='text', placeholder='Your https://osstool.microsoft.com approval URL', name='approvalUrl')
p
input.btn.btn-primary(type='submit', value='Submit Request')
| &nbsp;
a.btn.btn-default(href='/') Cancel
div#exemption-details.col-sm-12.col-md-12.col-lg-12
p Please provide more information about your repo including business reasoning and the context of your anticipated involvement.
p
small This request and your justification note will be stored for historical reasons, so consider that your request may be viewed by engineering managers, directors and CVPs as they review the open source activities and compliance goals that are in place.
p
textarea.form-control(rows=3, name='justification', placeholder='Justification, open source approval information, and/or context for team maintainers and leadership.')
h4 Initial Visibility
if allowPrivateRepos === true && allowPublicRepos !== true
p All new #{org.name} repos are initially private until ready to ship.
//- Members of a repo team with admin permissions can make a repo public by changing its Settings in GitHub.
if allowPrivateRepos !== true && allowPublicRepos === true
p All new repos are initially public. Members of a repo team with admin permissions can make a repo private by changing its Settings in GitHub.
if allowPrivateRepos === true && allowPublicRepos === true
p You can choose to make your repo initially public or private. Members of a repo team with admin permissions can change the repo's visibility by changing its Settings in GitHub.
div.form-group
span.col-sm-2(style={'text-align': 'right'}) Repo Visibility
div.col-sm-4
| <select name="visibility" form="permissionsForm"><option value="private">Private</option><option value="public">Public</option><select>
h4 Teams and permissions
//-p Permissions to a repo are granted on a per-team basis. Below, identify the teams and their maximum permission level for this repo.
p If you need new teams, <a href="https://github.com/orgs/#{orgName}/new-team" target="_new">create them in GitHub</a> before submitting this request.
div.container
input(type='hidden', name='teamCount', value=selectTeams.length)
each selectTeam in selectTeams
- var isSpecialReadTeam = false
div.row(
class={
'alert-gray': selectTeam.adminOnly || (selectTeam.id && selectTeam.info),
'ms-red-border-top': selectTeam.adminOnly,
'ms-blue-border-top': !selectTeam.adminOnly && selectTeam.id && selectTeam.info,
'transparent-border': !selectTeam.adminOnly && !selectTeam.id && !selectTeam.info
}
)
div.col-sm-12.col-md-12.col-lg-12
if selectTeam.adminOnly
h5 Repo Admin Team
else if selectTeam.id && selectTeam.info
- isSpecialReadTeam = true
h5
| Recommended Read Team&nbsp;
small= selectTeam.name
p= selectTeam.info
else
h5 Optional Team ##{selectTeam.number}
div.row(class=selectTeam.adminOnly || (selectTeam.id && selectTeam.info) ? 'alert-gray' : undefined)
div.col-sm-7.col-md-7.col-lg-7
p
select.form-control(name='existingTeam' + selectTeam.number)
option(value=0, selected=selectTeam.id ? 'selected' : undefined) None
each team in teams
if isSpecialReadTeam
if selectTeam.id === team.id
option(value=team.id, selected=team.id == selectTeam.id ? 'selected' : undefined)= team.name
-// else do not show the other teams
else
option(value=team.id, selected=team.id == selectTeam.id ? 'selected' : undefined)= team.name
div.col-sm-5.col-md-5.col-lg-5
p
select.form-control(name='existingTeamPermission' + selectTeam.number, id='existingTeamPermission' + selectTeam.number)
if !selectTeam.adminOnly
option(value='pull', selected='selected') Read (Pull, Fork)
if !selectTeam.readOnly
option(value='push') Write (Push, Accept PRs)
if !selectTeam.readOnly
option(value='admin') Admin (Web Hooks, Collaborators, Settings)
if approvers && approvers.length > 1
h4 Request Approver#{approvers.length > 1 ? 's' : ''} for #{org.name}
p Repo decisions for this organization are made by the following employee#{approvers.length > 1 ? 's' : ''}:
p
for teamMember in approvers
span.person-tile
if teamMember.avatar()
img(alt=teamMember.login, src=teamMember.avatar('80'), style='margin-right:10px;width:20px;height:20px', width=20, height=20)
a.btn.btn-sm.btn-muted(href='https://github.com/' + teamMember.login, title=teamMember.id, target='_new')= teamMember.login
if teamMember.contactEmail()
a.btn.btn-sm.btn-muted-more(href='mailto:' + teamMember.contactEmail())= teamMember.contactName()
if orgHasCla === true
.row.col-md-12.col-lg-12
h4 Contributor License Agreement
p.
This organization is integrated with the corporate CLA system.
Please provide a team discussion list or e-mail address to notify about submitted CLAs.
This e-mail address needs to be able to accept e-mail from outside the company.
.row.col-md-4.col-lg-4
p.lead Legal Entity
select.form-control(name='claEntity')
each team, key in claTeams
option(value=key)= key
option No CLA
.row.col-md-8.col-lg-8
p.lead Notification email(s)
p
input.form-control(type='text', name='claMail', placeholder='Comma-separated list of e-mail addresses to set')
p
br
input.btn.btn-primary(type='submit', value='Submit Request')
| &nbsp;
a.btn.btn-default(href='/') Cancel

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

@ -20,8 +20,10 @@ block content
div.col-md-4.col-lg-4
form(method='post', action=teamUrl + 'approvals/' + entry.RowKey)
p
a.btn.btn-sm.btn-muted(href='https://github.com/' + team.org.getWorkflowRepository().full_name + '/issues/' + entry.issue, target='_new')= entry.issue
| &nbsp;
//-if entry.issue
//- NOTE: Commenting out GitHub links with approval repos, since they are being deprecated internally and this is a quick fix
a.btn.btn-sm.btn-muted(href='https://github.com/' + team.org.getWorkflowRepository().full_name + '/issues/' + entry.issue, target='_new')= entry.issue
//-| &nbsp;
a.btn.btn-sm.btn-muted(href=teamUrl + 'approvals/' + entry.RowKey)
i.glyphicon.glyphicon-zoom-in
| &nbsp;
@ -73,7 +75,7 @@ block content
h5 EMAIL
p
a.btn.btn-sm.btn-muted-more(href='mailto:' + entry.email)= entry.email ? entry.email : 'Unknown'
| &nbsp;
| &nbsp;
a.btn.btn-sm.btn-default(href='mailto:' + entry.email) Send Mail
else
p No pending approvals. Nice work!

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

@ -13,9 +13,9 @@ block content
if entry.type == 'repo'
if entry.repoVisibility == 'public'
h1 New Public #{entry.org} Repository Request
h1 New public #{entry.org} Repository Request
else
h1 New Private #{entry.org} Repository Request
h1 New private #{entry.org} Repository Request
else
h1 Open Source Access Request
@ -35,9 +35,9 @@ block content
if entry.requestedTime && entry.requestedTime.toISOString
p
| This request was opened by
| This request was opened by&nbsp;
a(href='https://github.com/' + entry.ghu, target='_new')= entry.ghu
|
| &nbsp;
time(datetime=entry.requestedTime.toISOString())= entry.requestedTime.toDateString()
p
@ -151,16 +151,20 @@ block content
tr
if entry.type !== 'repo'
th Team Requested
th GitHub Tracking Issue
//-if entry.issue
//- NOTE: Commenting out GitHub links with approval repos, since they are being deprecated internally and this is a quick fix
th GitHub Tracking Issue
tbody
tr
if entry.type !== 'repo'
td
p
a(href='https://github.com/orgs/' + entry.org + '/teams/' + entry.teamname, target='_new')= entry.teamname
td
p
a.btn.btn-sm.btn-default(href='https://github.com/' + team.org.getWorkflowRepository().full_name + '/issues/' + entry.issue, target='_new')= entry.issue
//-if entry.issue
//- NOTE: Commenting out GitHub links with approval repos, since they are being deprecated internally and this is a quick fix
td
p
a.btn.btn-sm.btn-default(href='https://github.com/' + team.org.getWorkflowRepository().full_name + '/issues/' + entry.issue, target='_new')= entry.issue
table.table.table-bordered
thead

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

@ -11,12 +11,12 @@ block content
if entry.type == 'joinTeam'
h1
| Request to join
|
| &nbsp;
small.capitalize= entry.teamname
else if entry.type == 'repo'
h1.capitalize
| New #{entry.org} Repo Request
|
| &nbsp;
small.capitalize= entry.repoName
if entry.type == 'repo' && entry.repoVisibility == 'public'
@ -56,7 +56,8 @@ block content
p= entry.repoName
td
p
if team
//-if team && entry.issue
//- NOTE: Commenting out GitHub links with approval repos, since they are being deprecated internally and this is a quick fix
a.btn.btn-sm.btn-default(href='https://github.com/' + team.org.name + '/' + team.org.getWorkflowRepository().name + '/issues/' + entry.issue, target='_new')= entry.issue
if entry.justification

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

@ -1,40 +0,0 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../../layout
block content
div.container
h1 Remove team "#{team.name}"?
p.lead Are you sure that you wish to delete your team, "#{team.name}"?
p Thanks for your role in helping maintaining the GitHub membership of your team and the organization at large. This operation would delete the team but would not affect any of the repositories associated with it at this time.
p <strong>WARNING:</strong> This operation cannot be undone if you do not mean to delete this team. You would have to request a new team creation.
table.table
thead
tr
th Field
th Value
tbody
tr
td GitHub name
td= team.name
tr
td GitHub Team ID
td= team.id
tr
td Description
td= team.description
form.form-horizontal(method='post')
p
input.btn.btn-primary(type='submit',value='Delete this team',data-transition='fade', data-theme='c')
| &nbsp;&nbsp;
a.btn.btn-default(href=teamUrl) Cancel

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

@ -5,122 +5,314 @@
extends ../../layout
block content
div.container
h1
= team.name
small.capitalize &nbsp; #{team.org.name} Team Maintainer
if team.description
p.lead= team.description
h2 Team + Repo Management
table.table
tbody
tr
td
if pendingApprovals && pendingApprovals.length && pendingApprovals.length > 0
a.btn.btn-sm.alert-danger(href=teamUrl + 'approvals/')
strong= pendingApprovals.length
|
| Pending Approval#{pendingApprovals.length > 1 ? 's' : ''}
else
a.btn.btn-sm.btn-default(href=teamUrl + 'approvals/') No Pending Approvals
td
p Manage requests related to this team.
tr
td
a.btn.btn-default.btn-sm(href=teamUrl + 'properties/') Edit Name and Description
td
p Manage the basic GitHub properties for this team.
tr
td
a.btn.btn-default.btn-sm(href=teamUrl + 'repos/') Manage Repositories
td
p Take a repo from private to public, delete old repos, change repo descriptions. Manage repo collaborators.
tr
td
a.btn.btn-default.btn-sm(href=teamUrl + 'members/') Manage Team Members
td
p Invite new members to your team. Remove members from the team. Remove employees from the entire org when they leave the company.
tr
td
a.btn.btn-default.btn-sm(href=teamUrl + 'members/securityCheck') Audit 2FA Compliance
td
p Identify non-compliant members of your team who have two-factor authentication disabled.
tr
td
a.btn.btn-default.btn-sm(href=teamUrl + 'delete') Delete Team
td
p Delete this team permanently. Keeps all repos.
tr
td
a.btn.btn-default.btn-sm(href='https://github.com/orgs/' + team.org.name + '/teams/' + team.slug, target='_new')
| Open Team on GitHub
i.glyphicon.glyphicon-share-alt
td
p
| Opens the team within GitHub's web interface.
br
small Note that this portal provides elevated operations on your behalf: many operations are not available on GitHub.
h2 Team Maintainers
if maintainers && maintainers.length
if maintainers.length < 2
div.alert.alert-gray(role='alert')
strong This team only has a single maintainer
br
| It is strongly recommended that each team have at least 2 team maintainers to make it easier to stay on top of approving your team's join requests, handle the team during vacations and other times, and so on. Please add an additional team maintainer!
table.table
thead
tr
th
th Name
th GitHub Username
th Authorization Type
th Identity
th Action
tbody
each maintainer in maintainers
tr
td(width='40')
if maintainer.avatar()
p
img(alt=maintainer.login, src=maintainer.avatar('80'), style='margin-right:10px;width:40px;height:40px', width=40, height=40)
if maintainer.link
td= maintainer.link.aadname || maintainer.link.ghu || maintainer.id
else
td= maintainer.id
td= (maintainer.link && maintainer.link.ghu) ? maintainer.link.ghu : maintainer.login
td
if maintainer.link
p Active Directory
else
p <strong>User not registered in portal</strong>
td= maintainer.contactEmail() || maintainer.login
td
//- If the current maintainer is also the current site user
if maintainer.id == user.github.id
p
a.btn.btn-sm.btn-default(href=teamUrl + 'maintainers/transfer/') Transfer Role
if maintainers.length > 2
//- If there are already 2 other maintainer (total of 3), it's OK for the current user to drop themselves from the team.
| &nbsp;
a.btn.btn-sm.btn-default(href=teamUrl + 'maintainers/downgradeSelf') Downgrade Me to Member
else if maintainers.length > 1
p
a.btn.btn-sm.btn-default(href=teamUrl + 'maintainers/' + maintainer.id + '/downgrade') Downgrade to Member
else
p There are not yet any maintainers defined in the new permission system on GitHub.
//- TODO: Add back team maintainer management
mixin authenticGitHubLink()
ul.list-unstyled
li: a.btn.btn-sm(
href='https://github.com/orgs/' + organization.name + '/teams/' + team2.slug,
target="_blank",
class=admin ? 'btn-primary' : 'btn-muted-more'
)
= admin ? 'Manage on GitHub.com ' : 'Open on GitHub.com '
!= octicon('mark-github', 18)
if teamDetails && teamDetails.privacy === 'secret' && !membershipStatus
li: p: small: p This team is marked as #[strong secret]. On GitHub you may see a 404 error unless you join the team.
mixin membersList(typeOfList, membersList, isAdmin, moreMembersToShow)
ul.list-inline(style='margin-bottom:24px')
each member in membersList
li(style='vertical-align:top;width:370px')
ul.list-inline
if member.avatar_url
//- img-circle
li(style='vertical-align:top;margin-top:12px'): img(
alt=member.login,
src=member.avatar_url + '&s=96',
style='width:36px;height:36px')
li
- var primaryName = member.link ? (member.link.aadname || member.link.aadupn) : member.login
ul.list-unstyled(style='margin-right:16px')
li: h5
a(href='/people?q=' + member.login)= primaryName
if orgOwnersSet && orgOwnersSet.has(member.id)
= ' '
.label.label-info(title=organization.name + ' organization owner') Owner
ul.list-inline
if primaryName != member.login
li: p= member.login
if member.mailAddress
li: a(href='mailto:' + member.mailAddress, title='Send corporate email to ' + member.mailAddress)
!= octicon('mail', 16)
if isAdmin === true && typeOfList === 'member'
//- Member admin
if !maintainersSet.has(member.id)
li: ul.list-inline
li: form(method='post', action=teamUrl + 'maintainers/add')
input(type='hidden', name='username', value=member.login)
button.btn.btn-xs.btn-muted-more(
onclick='return confirm(\'Are you sure that you want to promote ' + member.login + ' to be a team maintainer?\');'
title='Add team maintainer rights for this user') Promote to maintainer
li: form(method='post', action=teamUrl + 'members/remove')
input(type='hidden', name='username', value=member.login)
button.btn.btn-xs.btn-muted-more(
onclick='return confirm(\'Are you sure that you want to remove ' + member.login + ' from the team?\');'
title='Remove this user from the team') Remove
if isAdmin === true && typeOfList === 'maintainer'
//- Maintainer admin
//- If the current member is also the current site user
if orgOwnersSet && orgOwnersSet.has(member.id)
//- Do not show "downgrade" of org owners
else
if member.id == user.github.id
//- a.btn.btn-xs.btn-muted-more(href=teamUrl + 'maintainers/transfer/') Transfer role
if membersList.length > 1
//- If there are already 1 other maintainer (total of 2), it's OK for the current user to drop themselves from the team.
li: form(method='post', action=teamUrl + 'maintainers/' + member.id + '/downgrade')
button.btn.btn-xs.btn-muted-more(
href=teamUrl + 'maintainers/' + member.id + '/downgrade',
onclick='return confirm(\'Are you sure that you want to downgrade your own team maintainer account to be a member? You will no longer be able to maintain this team on GitHub.\');') Downgrade yourself
else if membersList.length > 1
li: form(method='post', action=teamUrl + 'maintainers/' + member.id + '/downgrade')
button.btn.btn-xs.btn-muted-more(
onclick='return confirm(\'Are you sure that you want to downgrade this maintainer to a member?\');'
title='Remove team maintainer rights from this user') Downgrade
if moreMembersToShow
li: div(style='width:160px')
p.lead.text-primary.text-center: small &hellip; and others
block content
//- Variables
- var maximumMembersToShow = (4 * 3) - 1
- var maximumRepositoriesToShow = 5
//- View services
- var languageColor = viewServices.languageColor
- var octicon = viewServices.octicon
//- Mode variables
- var admin = teamPermissions.allowAdministration
div.container
.row: .col-md-12
h1
= team.name
if admin
= ' '
if isOrgOwner
.label.label-info.shrink66(
title='You are an organization owner'
)= 'Organization owner'
else
.label.label-warning.shrink66(
title=teamPermissions.sudo ? 'As a sudo maintainer, you can administer team settings in this application but not directly on GitHub.com' : 'As a team maintainer you can administer team settings in this application and directly on GitHub.com'
)= teamPermissions.sudo ? 'Sudo maintainer' : 'Team maintainer'
if membershipStatus === 'member'
= ' '
.label.label-muted.shrink66 Member
if isSystemTeam
= ' '
.label.label-danger.shrink66 System team
h5= organization.name + ' organization'
if team.description
p.lead= team.description
.row
.col-md-8
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- JOIN
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if !membershipStatus
//- TODO: If they are not an org member, figure out what to do!
.panel.panel-default
.panel-heading
h3.panel-title
if isSystemTeam
| You are not a member of this team
else if isBroadAccessTeam
| Become a team member now
else
| Request to become a team member
.panel-body
if isBroadAccessTeam
p.
You can immediately join this team, it is designed to provide broad access
to organization members.
else if isSystemTeam
p As a system team, this team's membership is closed.
else
p.
You're not currently a member of this team. You can submit a request
to join the team. A team maintainer will review your ask.
p
if isSystemTeam
a.btn.btn-sm.btn-default(href='#', disabled=true) Membership is closed
else
a.btn.btn-sm.btn-primary(href=teamUrl + 'join') Join this team
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- TEAM MAINTAINERS
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if maintainers
h2
= 'Team Maintainers '
small: a(href=teamUrl + 'maintainers/refresh', title='Refresh the team maintainers list')
i.glyphicon.glyphicon-refresh
if maintainers.length <= 0
div.alert.alert-danger(role='alert')
strong This team does not have any maintainers
br
| Without team maintainers members cannot request access to this team and it is unclear who the owner of the repository is.
else
if maintainers.length < 2
div.alert.alert-warning(role='alert')
strong This team only has a single maintainer
br
| It is strongly recommended that a team have multiple maintainers to make it easier to stay on top of permission requests.
+membersList('maintainer', maintainers, admin)
if admin
ul.list-inline
li: a.btn.btn-sm.btn-muted(href=teamUrl + 'maintainers/add') Add a team maintainer
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- TEAM MEMBERS
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if membersFirstPage
h2
= 'Members '
small: a(href=teamUrl + 'members/refresh', title='Refresh the team members list')
i.glyphicon.glyphicon-refresh
if membersFirstPage.length <= 0
p This team has no members.
else
- var membersSubset = membersFirstPage.slice(0, maximumMembersToShow)
- var hasMore = membersFirstPage.length > membersSubset.length
+membersList('member', membersSubset, admin, hasMore)
ul.list-inline
if membersFirstPage.length
li: a.btn.btn-sm.btn-muted(href=teamUrl + 'members/browse/', title='Only a subset of members are listed on this page. A full view is also available.')
if teamDetails && teamDetails.members_count
= 'Browse all ' + teamDetails.members_count.toLocaleString() + ' members'
else
| Browse all team members
if admin
li: a.btn.btn-sm.btn-muted(href=teamUrl + 'members/add') Add a member
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- REPOSITORIES
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
hr
h2 Repositories
if repositories && teamDetails && teamDetails.repos_count
- var actualCount = repositories.length
- var countDifference = teamDetails.repos_count - actualCount
if countDifference <= 0
p.
This team provides access to #{teamDetails.repos_count.toLocaleString()}
#{teamDetails.repos_count === 1 ? 'repository' : 'repositories'}.
else
p.
This team provides access to #{actualCount.toLocaleString()}
#{actualCount === 1 ? 'repository' : 'repositories'} and
#{countDifference.toLocaleString()} #{actualCount === 1 ? 'fork' : 'forks'}.
else
p This team does not offer access to any repositories.
if repositories && repositories.length
- var repoCount = 0
- var localOrgName = organization.name
- var specificTeam = team2
each repositoryPermission in repositories
if (repoCount++ <= maximumRepositoriesToShow)
- var repo = repositoryPermission.repository
- var repoPermissions = repositoryPermission.permissions
.repo(id=repo.name, style='padding-bottom:36px;display:block')
h3
a(href='/' + localOrgName + '/repos/' + repo.name)= repo.name
if repo.private === true
| &nbsp;
.label.label-warning.shrink66(title='This is a private repository and not open source.') Private
if repoPermissions && specificTeam
= ' '
if repoPermissions.admin
.label.label-danger.shrink66(title='The ' + specificTeam.name + ' team grants permission to administer the repo') Admin
else if repoPermissions.push
.label.label-warning.shrink66(title='The ' + specificTeam.name + ' team grants permission to commit directly to the repo and accept pull requests') Write
else if repoPermissions.pull
.label.label-success.shrink66(title='The ' + specificTeam.name + ' team grants permission to clone/read/see the repo') Read
if repo.description
p=repo.description
small
ul.list-inline.list-horizontal-space
if repo.language
li
span(style={color: languageColor(repo.language)})
!= octicon('primitive-dot', 10)
= ' ' + repo.language
if repo.stargazers_count
li
!= octicon('star', 15)
= ' ' + repo.stargazers_count.toLocaleString()
if repo.forks_count
li
!= octicon('repo-forked', 12)
= ' ' + repo.forks_count.toLocaleString()
if repositories.length > maximumRepositoriesToShow
h3 and more &hellip;
p: a.btn.btn-sm.btn-muted(href=teamUrl + 'repos/') Browse all #{repositories.length} repositories assigned to the team
.col-md-4(style='margin-top:24px')
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- AUTHENTIC GITHUB EXPERIENCE
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if !admin
+authenticGitHubLink()
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- ADMINISTRATION
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if admin
if pendingApprovals && pendingApprovals.length && pendingApprovals.length > 0
h2 Permission requests
p: a.btn.btn-sm.alert-danger(href=teamUrl + 'approvals/')
strong= pendingApprovals.length
| &nbsp;
| Pending Approval#{pendingApprovals.length > 1 ? 's' : ''}
h3 Team management
+authenticGitHubLink()
ul.list-unstyled.list-vspace
li: a.btn.btn-muted.btn-sm(href=teamUrl + 'properties/', title='Manage the basic GitHub properties for this team') Team name & description
li: a.btn.btn-muted.btn-sm(href=teamUrl + 'repos/', title='Take a repo from private to public, delete old repos, change repo descriptions. Manage repo collaborators.') Manage repositories
li: a.btn.btn-muted.btn-sm(href=teamUrl + 'members/browse', title='Invite new members to your team. Remove members from the team. Remove employees from the entire org when they leave the company.') Manage members
li: a.btn.btn-muted.btn-sm(href=teamUrl + 'members/browse?twoFactor=off', title='Identify non-compliant members of your team who have two-factor authentication disabled.') Two-factor check
li: form(method='post', action=teamUrl + 'delete')
button.btn.btn-sm.btn-muted(
onclick='return confirm(\'Are you sure that you want to delete this team? This is a permanent operation.\');'
title='Permanently delete the team') Delete team
h3 Add a new team maintainer
form.form-horizontal(method='post', action=teamUrl + 'maintainers/add')
p
select.form-control#inputMaintainer(name='maintainer2')
each employee in employees
option(value=employee.ghid, selected=employee.ghid == user.github.id)= employee.aadupn + ' (' + employee.ghu + ')'
p
input.btn.btn-default(type='submit',value='Add new team maintainer',data-transition='fade', data-theme='c')
hr
small
ul.list-unstyled
li This team has the GitHub ID of <strong>#{team.id}</strong>
if !(pendingApprovals && pendingApprovals.length && pendingApprovals.length > 0)
li There are currently no pending approvals for you to manage. Nice!
li This team has the GitHub ID of #{team.id}

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

@ -7,29 +7,39 @@ extends ../../layout
block content
div.container
h1
| Join Request
small.capitalize= team.name
if team.description
p.lead= team.description
p This form will open a request to join the <em>#{team.name}</em> team. Keep in mind that with the <a href="https://guides.github.com/introduction/flow/" target="_new">GitHub fork and pull request workflow <i class="glyphicon glyphicon-share-alt"></i></a>, you may be able to successfully contribute to an effort with just read rights.
if teamMaintainers
h4 Team Maintainer#{teamMaintainers.length > 1 ? 's' : ''}
p Permission decisions are delegated to the following maintainer#{teamMaintainers.length > 1 ? 's' : ''} of the team:
p
for teamMember in teamMaintainers
span.person-tile
if teamMember.avatar()
img(alt=teamMember.login, src=teamMember.avatar('80'), style='margin-right:10px;width:20px;height:20px', width=20, height=20)
a.btn.btn-sm.btn-muted(href='https://github.com/' + teamMember.login, title=teamMember.id, target='_new')= teamMember.login
if teamMember.contactEmail()
a.btn.btn-sm.btn-muted-more(href='mailto:' + teamMember.contactEmail())= teamMember.contactName()
form(method='post')
h4 Context & Business Justification
p Please provide context for the approvers, including your business justification and any context they may need. Did someone suggest that you join the team?
p
textarea.form-control(rows=3, name='justification', placeholder='Required: Business Justification')
p
input.btn.btn-primary(type='submit', value='Submit Team Access Request')
| &nbsp;
if allowSelfJoin
h1
| Join confirmation&nbsp;
small=team.name
p This team is open to everyone in the organization. Would you like to join this team?
form(method='post')
input.btn.btn-primary(type='submit', value='Join')
| &nbsp;
a.btn.btn-default(href=team.org.baseUrl + 'teams') Cancel
else
h1
| Join Request&nbsp;
small= team.name
if team.description
p.lead= team.description
p This form will open a request to join the <em>#{team.name}</em> team. Keep in mind that with the <a href="https://guides.github.com/introduction/flow/" target="_new">GitHub fork and pull request workflow</a>, you may be able to successfully contribute to an effort with just read rights.
if teamMaintainers
h4 Team Maintainer#{teamMaintainers.length > 1 ? 's' : ''}
p Permission decisions are delegated to the following maintainer#{teamMaintainers.length > 1 ? 's' : ''} of the team:
p
for teamMember in teamMaintainers
span.person-tile
if teamMember.avatar()
img(alt=teamMember.login, src=teamMember.avatar('80'), style='margin-right:10px;width:20px;height:20px', width=20, height=20)
a.btn.btn-sm.btn-muted(href='https://github.com/' + teamMember.login, title=teamMember.id, target='_new')= teamMember.login
if teamMember.contactEmail()
a.btn.btn-sm.btn-muted-more(href='mailto:' + teamMember.contactEmail())= teamMember.contactName()
form(method='post')
h4 Context & Business Justification
p Please provide context for the approvers, including your business justification and any context they may need. Did someone suggest that you join the team?
p
textarea.form-control(rows=3, name='justification', placeholder='Required: Business Justification')
p
input.btn.btn-primary(type='submit', value='Submit Team Access Request')
| &nbsp;
a.btn.btn-default(href=team.org.baseUrl + 'teams') Cancel

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

@ -1,27 +0,0 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../../../layout
block content
div.container
h1 Downgrade maintainer "#{maintainer.ghu}" from team "#{team.name}"?
p This action will remove downgrade the user to a member instead of a team maintainer.
form.form-horizontal(method='post')
div.form-group
div.col-sm-2.control-label Team Title
div.col-sm-10.control-label(style='text-align: left')= team.name
div.form-group
div.col-sm-2.control-label GitHub Username to remove
div.col-sm-10.control-label(style='text-align: left')= maintainer.ghu || maintainer.ghid
div.form-group
div.col-sm-12
input.btn.btn-primary(type='submit',value='Confirm downgrade to member',data-transition='fade', data-theme='c')

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

@ -1,36 +0,0 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../../../layout
block content
div.container
h1 Transfer your maintainance role of team "#{team.name}"?
p This action will transfer your team maintainer role for this specific team to another employee.
p Your access will be downgraded to member. If you wish to leave the team all-together, you will then have to remove yourself from the team, too.
form.form-horizontal(method='post')
div.form-group
div.col-sm-2.control-label Team Title
div.col-sm-10.control-label(style='text-align: left')= team.name
div.form-group
div.col-sm-2.control-label Your GitHub Username
div.col-sm-10.control-label(style='text-align: left')= user.github.username || user.github.id
div.form-group
label.col-sm-2.control-label(for='inputMaintainer') New Team Maintainer
div.col-sm-10
select.form-control#inputMaintainer(name='newMaintainer')
each employee in employees
option(value=employee.ghid, selected=employee.ghid == user.github.id)= employee.aadupn + ' (' + employee.ghu + ')'
div.form-group
div.col-sm-12
input.btn.btn-primary(type='submit',value='Confirm transfer of role',data-transition='fade', data-theme='c')

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

@ -44,8 +44,6 @@ block content
td
a.btn.btn-sm.btn-muted(href=teamMember.corporateProfileUrl(), target='_new')
= teamMember.corporateAlias() || teamMember.link.aadupn
|
i.glyphicon.glyphicon-share-alt
else
td ?
td.twentypercent

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

@ -1,37 +0,0 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../../layout
block content
div.container
h1 Remove GitHub user "#{removeUsername}" from your team "#{team.title || team.ghname}"?
p Thanks for your role in helping maintaining the GitHub membership of your team and the organization at large.
p.lead Should this member be removed from your team alone, or from the entire organization?
form.form-horizontal(method='post')
div.container
div.row
div.col-md-4.col-lg-4.col-sm-4
p
input.btn.btn-primary(name='removeFromTeam', type='submit', value='Remove from team')
div.col-md-4.col-lg-4.col-sm-4
p
input.btn.btn-default(name='removeFromOrg', type='submit', value='Remove from organization')
div.col-md-4.col-lg-4.col-sm-4
p
input.btn.btn-default(type='button', value='Cancel', onclick='window.history.back()')
div.row
div.col-md-4.col-lg-4.col-sm-4
p Remove this user simply from this one team that you manage, <strong>#{team.title || team.ghname}</strong>. The user will remain in any other team(s) across the organization.
div.col-md-4.col-lg-4.col-sm-4
p Dropping a user from the organization will require them to re-join the organization + any/all teams in the case of a mistake.
p Please note that this operation cannot be easily reversed.
p <strong>The primary purpose of the organization remove function is to handle departures from the company.</strong>
div.col-md-4.col-lg-4.col-sm-4
p Press to go back without committing any changes to the user, team or organization.

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

@ -45,15 +45,20 @@ block content
tr
td
p
a.btn.btn-default.btn-sm(href=teamUrl + 'repos/' + repo.name + '/collaborators') Manage Collaborators
a.btn.btn-default.btn-sm(href=teamUrl + 'repos/' + repo.name + '/collaborators') Manage collaborators
td
p Manage Outside Collaborators and one-off corporate collaborator permissions.
if legacyClaTeams
tr
td
p
a.btn.btn-default.btn-sm(href=teamUrl + 'repos/' + repo.name + '/legacyCla') Manage CLA settings
td
p Microsoft contributor license agreement settings
tr
td
p
a.btn.btn-default.btn-sm(href=repo.html_url, target='_new')
| View repo on GitHub
i.glyphicon.glyphicon-share-alt
a.btn.btn-default.btn-sm(href=repo.html_url, target='_new') View repo on GitHub
td
p
= repo.html_url

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

@ -8,9 +8,8 @@ extends ../../../layout
block content
div.container
h1.capitalize
=repo.full_name
|
h1
= repo.full_name + ' '
small Delete
p This will delete the repo. It may not delete forks if the repo is public. If the repo is private, data loss could occur.

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

@ -9,8 +9,7 @@ block content
div.container
h1
span.capitalize= repo.name
|
span= repo.name + ' '
small Visibility
if repo && repo.private === true

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

@ -9,8 +9,7 @@ block content
div.container
h1
span.capitalize= repo.name
|
span= repo.name + ' '
small Update Properties
if repo

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

@ -10,7 +10,7 @@ block content
h1 Collaborators
p.
A collaborator on GitHub is someone who has access to a specific repo, with a specific set of
A collaborator on GitHub is someone who has access to a specific repo, with a specific set of
permissions, but who is not necessarily a member of the organization.
if corporateCollaborators && corporateCollaborators.length && corporateCollaborators.length > 0
h2 #{corporateCollaborators.length > 1 ? corporateCollaborators.length : ''} Corporate Collaborator#{corporateCollaborators.length > 1 ? 's' : ''}
@ -36,12 +36,10 @@ block content
td
if teamMember.link
p
| Active Directory
| Active Directory
| &nbsp;
a.btn.btn-sm.btn-muted(href=teamMember.corporateProfileUrl(), target='_new')
= teamMember.corporateAlias() || teamMember.link.aadupn
|
i.glyphicon.glyphicon-share-alt
if teamMember.contactEmail()
| &nbsp; &nbsp;
a.btn.btn-sm.btn-default(href='mailto:' + teamMember.contactEmail()) Send Mail
@ -62,11 +60,11 @@ block content
if collaborators.length && collaborators.length > 0
h2 #{collaborators.length > 1 ? collaborators.length : ''} Outside Collaborator#{collaborators.length > 1 ? 's' : ''}
p.
The Outside Collaborator role is ideal for external vendors or partners on projects who do not
The Outside Collaborator role is ideal for external vendors or partners on projects who do not
have corporate credentials.
p.
It is the responsibility of repo team maintainers to carefully select, curate and manage their
collaborators, since these users exist outside of the organizational management system. Employees
It is the responsibility of repo team maintainers to carefully select, curate and manage their
collaborators, since these users exist outside of the organizational management system. Employees
should always join the org instead of being appointed as Outside Collaborators.
div
table.table
@ -89,12 +87,10 @@ block content
td
if teamMember.link
p
| Active Directory
| Active Directory
br
a.btn.btn-sm.btn-muted(href=teamMember.corporateProfileUrl(), target='_new')
= teamMember.corporateAlias() || teamMember.link.aadupn
|
i.glyphicon.glyphicon-share-alt
else
p Outside Collaborator
td
@ -112,7 +108,7 @@ block content
div.col-md-6.col-lg-6.col-sm-6
h2 Add an Outside Collaborator
p.
An outside collaborator is not an employee. They are not tracked by this portal. As a team maintainer, <em>you</em>
An outside collaborator is not an employee. They are not tracked by this portal. As a team maintainer, <em>you</em>
are responsible for your outside collaborators.
p.
When an outside collaborator's need for access is done, please remove the user from the repo.
@ -133,11 +129,11 @@ block content
div.col-md-6.col-lg-6.col-sm-6
h2 Add a Corporate Collaborator
p.
You can also add an existing organization member (an employee) as a collaborator on
You can also add an existing organization member (an employee) as a collaborator on
a specific repository.
p.
The most common scenario for the capability is to add a specific employee with "Admin"
privilege. This will let that employee use the "settings" tab for the repo on the
The most common scenario for the capability is to add a specific employee with "Admin"
privilege. This will let that employee use the "settings" tab for the repo on the
GitHub.com site to configure web hooks, repo properties, and other essentials.
p.
We still recommend the team approach for most operations.

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

@ -13,8 +13,6 @@ block content
p
a.btn.btn-muted.btn-sm(href='https://github.com/' + pendingRequest.org + '/' + pendingRequest.repoName, target='_new')
| https://github.com/#{pendingRequest.org}/#{pendingRequest.repoName}
|
i.glyphicon.glyphicon-share-alt
p
| The repo #{pendingRequest.repoName} has been created in the #{pendingRequest.org} organization successfully.
if pendingRequest.repoVisibility == 'private'

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

@ -1,61 +0,0 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../../layout
block content
div.container
h1 Team Security Check
p Modern security (two-factor) is required to help preserve the security of credentials, the organization and the company.
if noncompliantUsers && noncompliantUsers.length > 0
p Your team has #{noncompliantUsers.length} user(s) that are not compliant. Please have them enable two-factor authentication on their GitHub account.
table.table
thead
tr
th Avatar
th Modern Security
th GitHub Username
th Authorization Type
th Identity
th Actions
tbody
for teamMember in noncompliantUsers
tr
td
p
if teamMember.avatar()
img(alt=teamMember.login, src=teamMember.avatar(100) + '&s=100', style='margin-right:10px;width:50px;height:50px', width=50, height=50, data-user=teamMember.id)
td
p
strong(style='color:red') NO 2FA
td
a.btn.btn-sm.btn-muted(href='https://github.com/' + teamMember.login, title=teamMember.id)= teamMember.login
td
if teamMember.link
p Active Directory
else
p
strong UNKNOWN
br
small This user may have been added by a GitHub administrator for the organization. The user is not registered in the table of identities.
td= teamMember.contactEmail()
td
form(method='get', action=teamUrl + 'members/' + teamMember.login + '/remove')
if (teamMember.contactEmail())
p
a.btn.btn-sm.btn-default(href='mailto:' + teamMember.contactEmail()) Send mailto
p
input.btn.btn-sm.btn-default(type='submit', value='Remove from team', data-transition='fade', data-theme='c')
else
h2
i.glyphicon.glyphicon-ok
|
| Your team is OK
p Your team is in full compliance at this time. Thank you for your efforts.

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

@ -10,13 +10,12 @@ block js_doc_ready
block content
div.container
if onboardingOrJoining
if orgUser
div.row
div.col-md-9.col-lg-9.col-sm-9
div.col-md-8.col-lg-8.col-sm-8
h1.huge Welcome!
p.lead You're ready to go, onboarded and ready to contribute & collaborate with the #{org.name} open source world.
p.lead You're onboarded and ready to contribute & collaborate in the #{org.name} open source world.
if org.inner.settings.trainingResources
p Here are some useful links and resources to help get you up and running quickly.
- var tr = org.inner.settings.trainingResources
@ -54,40 +53,44 @@ block content
br
small= resource.text
div.col-md-3.col-lg-3.col-sm-3
div.col-md-4.col-lg-4.col-sm-4
p
img.img-thumbnail.img-responsive(src=orgUser.avatar(400), alt=(orgUser.name || orgUser.login))
h3= orgUser.name
h4= orgUser.login
p(style='margin-top:18px')
a.btn.btn-sm.btn-muted(href='https://github.com/' + org.name, target='_new')
| View on GitHub
i.glyphicon.glyphicon-share-alt
if org && org.baseUrl
p
a.btn.btn-sm.btn-muted(href=org.baseUrl)
| #{org.name} Portal
a.btn.btn-sm.btn-muted(href='https://github.com/' + org.name, target='_new') Open on GitHub
if org && org.baseUrl
p
a.btn.btn-sm.btn-muted(href=org.baseUrl) #{org.name} Portal
if isSudoer || userIsMaintainer
h1
| Teams
| Teams&nbsp;
if isSudoer
small including sudoer options
else
h1 Join a Team
div.row
div.col-md-8.col-lg-8.col-sm-8
h1 Join a team
p All GitHub users have read permissions on all public repos. You can use the standard fork and pull-request GitHub workflow and contribute to any repo you can read. That's what open source is all about!
if onboardingOrJoining
p Now that you're an organization member, you can request to join any teams if you need access to private repos or special permissions, such as those to accept pull requests. You can use the standard GitHub workflow of fork-pull request to contribute to nearly any repo when you have read (pull) access.
else
p On GitHub, source code is stored in a <strong>Repository</strong> (repo). <strong>Teams</strong> manage who can see and directly write to sets of repos.
p Joining a team gets you <a href="https://help.github.com/articles/repository-permission-levels-for-an-organization/" target="_new">more access to more repos</a>. For example, join a team to:
ul
li See private repos&mdash;they can only be seen by members of a team granted access.
li Merge PRs, manage issues&mdash;needed to change content, accept pull requests, &hellip;.
li Administer&mdash;needed to manage a repo's settings, and protected branches.
p To get these additional permissions, you need to join a team that has the permission you want.
div.col-md-4.col-lg-4.col-sm-4
if org && org.name
h3 Need help finding a team?
p Sometimes it's easiest to start with a repo you want to work on and find its associated teams.
p
a.btn.btn.btn-default(href='/' + org.name + '/repos') Explore repos. Find teams to join
if org && org.name
h3 Need help finding the right team?
p Use the "Explore repos" feature to find the team that you need if you know the name of the repo you're looking to work with. For public open source projects, you can always just fork a repo and submit a pull request with your changes. For private repos, you need to have "read" access to a repo.
if org && org.name
p
a.btn.btn-sm.btn-default(href='/' + org.name + '/repos') Explore repos to find teams
if highlightedTeams && highlightedTeams.length
h3 Recommended Team#{highlightedTeams.length > 1 ? 's' : ''}
@ -106,7 +109,7 @@ block content
if availableTeams && availableTeams.length && availableTeams.length > 0
if org
h3.capitalize #{org.name} Teams
h3.capitalize #{org.name} teams
else
h3 All teams across organizations
@ -167,7 +170,7 @@ block content
else
if isSudoer
a.btn.btn-muted.btn-sm(href='/' + availableTeam.org.name + '/teams/' + availableTeam.slug) Manage as sudoer
| &nbsp;
| &nbsp;
a.btn.btn-default.btn-sm(href='/' + availableTeam.org.name + '/teams/' + availableTeam.slug + '/join') Request to join
else

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

@ -0,0 +1,10 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
p You can find out more about GitHub two-factor authentication online:
ul
li <a href="https://github.com/blog/1614-two-factor-authentication">GitHub blog post about 2FA</a>
li <a href="https://help.github.com/articles/about-two-factor-authentication/">GitHub 2FA help</a>

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

@ -21,15 +21,16 @@ block content
| Closed / Resolved
else
| Unknown
if entry.justification
if entry.justification
h4
| BUSINESS JUSTIFICATION
| BUSINESS JUSTIFICATION
small written by #{entry.ghu}
blockquote= entry.justification
if entry.active === true
h4 DETAILS
p
if team
//-if team && entry.issue
//- NOTE: Commenting out GitHub links with approval repos, since they are being deprecated internally and this is a quick fix
a.btn.btn-sm.btn-default(href='https://github.com/' + team.org.name + '/' + team.org.getWorkflowRepository().name + '/issues/' + entry.issue, target='_new') GitHub Tracking Issue# #{entry.issue}
p
small This is the issue created on GitHub and assigned to a team maintainer to handle the request. Note that the issue is visible by everyone who is a member of the organization on GitHub, so it is not the best place to provide specific justification information... but if you bump the issue, the contact should hopefully get a reminder to take a look.

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

@ -43,15 +43,15 @@ block content
li <strong>innerError</strong>:
ul
each js2, val2 in json.innerError
if js2.toString() == '[object Object]'
if js2 && js2.toString() == '[object Object]'
li <strong>#{val2}</strong>:
ul
each js3, val3 in js2
if js3.toString() == '[object Object]'
if js3 && js3.toString() == '[object Object]'
li <strong>#{val3}</strong>:
ul
each js4, val4 in js3
if js4.toString() == '[object Object]'
if js4 && js4.toString() == '[object Object]'
li <strong>#{val4}</strong>:
ul
each js5, val5 in js4

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

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

@ -0,0 +1,22 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../../layout
block content
.container
h1 Dropped
if results
h3 Results
ul
each result in results
li= result
else
p No results. No operations were performed.
if entity
h3 Link information and/or GitHub user data
pre= JSON.stringify(entity, undefined, 2)

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

@ -0,0 +1,200 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../../layout
block content
div.container
p
a.btn.btn-sm.btn-default(href='/') Back
if info && info.renamedUserMessage
.alert.alert-warning
h3 Renamed user
p.lead= info.renamedUserMessage
if info && info.ghu && info.ghid
h1
= info.ghu
if info.serviceAccount
= ' '
.label.label-warning Service account
p Here is the information we have on this user. This user has a #[strong link].
if personEntry && personEntry.serviceAccount
.alert.alert-success
h3 Marked as a Service Account
.row
.col-md-6
h5 REDIS PEOPLE COLLECTION
p
small Daily snapshot from people feed
if personEntry
.alert.alert-success
h3
| Known person &nbsp;
small= upn
if personEntry && personEntry.alias
p
a.btn.btn-sm.btn-default(target='_new', href='http://who/is/' + personEntry.alias)= 'http://who/is/' + personEntry.alias
p Based on the most recent Redis cache of the employee directory, this employee is known and active.
pre(style='font-size:8pt;width:50%')= JSON.stringify(personEntry, undefined, 2)
else
- var whatWeKnow = upn || info.aadupn
- var strippedAlias = whatWeKnow && whatWeKnow.includes('@') ? whatWeKnow.substr(0, whatWeKnow.indexOf('@')) : null
.alert(class=info && info.serviceAccount ? 'alert-success' : 'alert-danger')
h3
| Unknown person &nbsp;
small= whatWeKnow
p Based on the most recent Redis cache of the employee directory, there is no entry for this UPN.
if strippedAlias
p We have stripped a potential alias from the e-mail address, #{whatWeKnow}, to get to #{strippedAlias}...
p
a.btn.btn-sm.btn-default(target='_new', href='http://who/is/' + strippedAlias)= 'http://who/is/' + strippedAlias
.col-md-6
h5 REAL-TIME MICROSOFT GRAPH
p
small Includes service accounts
if realtimeGraph
.alert.alert-success
h3 Account exists by ID
if realtimeGraph.displayName
h4= realtimeGraph.displayName
ul
li AAD ID: #{realtimeGraph.id}
if realtimeGraph.mail
li Corporate mail: #{realtimeGraph.mail}
if realtimeGraph.userPrincipalName
li UPN: #{realtimeGraph.userPrincipalName}
if realtimeGraph.manager
h4 Manager: #{realtimeGraph.manager.displayName}
ul
li AAD ID: #{realtimeGraph.manager.id}
if realtimeGraph.manager.mail
li Corporate mail: #{realtimeGraph.manager.mail}
if realtimeGraph.manager.userPrincipalName
li UPN: #{realtimeGraph.manager.userPrincipalName}
else if info && info.serviceAccount
.alert.alert-success
h4 No manager in the graph
p This account has no manager. It is properly marked as a "Service Account"
else
.alert.alert-warning
h4 No manager in the graph
p This account has no manager. It is likely a Service Account.
else
p No results. The real-time lookup requires the following conditions:
if info && info.aadoid
.alert.alert-danger
h3 Former employee
h5 Known ID #{info.aadoid} is missing
else
.alert.alert-warning
h3 Potential former employee
h5 Validate whether they are still employed
p No AAD ID was previously known, so they never linked their account using the portal when we were able to retrieve their ID
ul
li That the account is linked
li That the linked account has an Active Directory ID (AAD ID). An account may not have the AAD ID if they have never used the portal while signed in.
if info && info.aadoid
li This account #[strong did] have an AAD ID that failed the lookup: #{info.aadoid}
table.table
thead
tr
th GitHub Username
th GitHub User ID
tbody
tr
td
p
a.btn.btn-muted-more.btn-sm(href='https://github.com/' + info.ghu, target='_new')= info.ghu
td= info.ghid
if info.aadupn
h2 #{config.brand.companyName} Directory
table.table
thead
tr
th Name
th Email
tbody
tr
td= info.aadname
td
a.btn.btn-sm.btn-muted-more(href='mailto:' + info.aadupn)= info.aadupn
hr
//- not used
if info.foundGitHubId
pre= JSON.stringify(info.foundGitHubId, undefined, 2)
if info && info.orgs
h1 Active GitHub Organization Memberships
.container
each org in info.orgs
.row
.col-md-4
p.lead= org.name
.col-md-4
p
a.btn.btn-sm.btn-muted(target='_new', href='https://github.com/orgs/' + org.name + '/people?utf8=%E2%9C%93&query=' + info.ghu) View #{info.ghu} in GitHub people list
- var ghLogin = info.ghu || (info.githubInfoButNoLink ? info.githubInfoButNoLink.login : 'UNKNOWN THIS IS A BUG')
form(method='post', action=postUrl || '/organization/whois/github/' + ghLogin)
if info.orgs.length && info.orgs.length > 0
h1 Actions
p.lead DANGER ZONE - NO CONFIRMATION
ul.list-inline
li
input.btn.btn-danger(type='submit', value=info.ghid && info.ghu ? 'Remove link + drop from ' + info.orgs.length + ' orgs' : 'Drop from ' + info.orgs.length + ' orgs', name='remove-all')
if info.aadupn && !info.serviceAccount
li
input.btn.btn-default(type='submit', value='Mark as Service Account', name='mark-as-service-account')
if info.aadupn && info.serviceAccount
li
input.btn.btn-default(type='submit', value='Remove Service Account designation', name='unmark-service-account')
else if info.ghid && info.ghu
p <strong>NOTE:</strong> This user is not currently a member of any organizations. However, the "link" with their previous account still exists. Consider removing this.
h1 Actions
p.lead DANGER ZONE - NO CONFIRMATION
p
input.btn.btn-danger(type='submit', value='Remove link', name='remove-link-only')
if info && info.githubInfoButNoLink
h1 WHOIS #{info.githubInfoButNoLink.login}
p.lead We could not find a link for this user. This is a GitHub user.
p This person is not in any of the organizations managed by this site.
//-form(method='post', action=postUrl || '/organization/whois/github/' + info.ghu)
p
input.btn.btn-default(type='submit', value='Drop from org', name='remove-primary-org')
h3 GitHub Profile
ul
each value, property in info.githubInfoButNoLink
li
strong= property
| :&nbsp;
= value
else
if info && info.aadupn
p Their UPN was #{info.aadupn}
else
h1 We don't know who that is in relation to this system!
ul
li No "link" present currently
li Not a member of any of the official organizations at this time based on GitHub API data

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

@ -1,78 +0,0 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../../layout
block content
div.container
p
a.btn.btn-sm.btn-default(href='/') Back
if info && info.ghu && info.ghid
h1 WHOIS #{info.ghu}
p Here is the information we have on this user. There is at least a "link" (association) present.
table.table
thead
tr
th GitHub Username
th GitHub User ID
tbody
tr
td
p
a.btn.btn-muted(href='https://github.com/' + info.ghu, target='_new')= info.ghu
td= info.ghid
if info.aadupn
h2 #{config.companyName} Azure Active Directory Association
table.table
thead
tr
th Name
th Email
tbody
tr
td= info.aadname
td
a.btn.btn-muted(href='mailto:' + info.aadupn)= info.aadupn
hr
//- not used
if info.foundGitHubId
pre= JSON.stringify(info.foundGitHubId, undefined, 2)
if info.orgs
each org in info.orgs
h2 Member of #{org.name} organization
form(method='post', action=postUrl || '/organization/whois/github/' + info.ghu)
if info.orgs.length && info.orgs.length > 0
p
input.btn.btn-default(type='submit', value='Remove user association and remove from all organizations', name='remove-all')
else
p <strong>NOTE:</strong> This user is not currently a member of any organizations. However, the "link" with their previous account still exists. Consider removing this.
p
input.btn.btn-default(type='submit', value='Remove user association (link)', name='remove-link-only')
else if info.githubInfoButNoLink
h1 WHOIS #{info.githubInfoButNoLink.login}
p This user is a GitHub member but is NOT in the system with a valid "link". Consider removing from the primary organization. At this time, the tooling is not looking at sub-organization membership (yet).
form(method='post', action=postUrl || '/organization/whois/github/' + info.ghu)
p
input.btn.btn-default(type='submit', value='Drop from primary org', name='remove-primary-org')
//-pre= JSON.stringify(info.githubInfoButNoLink, undefined, 2)
else
h1 We don't know who that is in relation to this system!
ul
li No "link" present currently
li Not a member of any of the official organizations at this time based on GitHub API data

253
views/people/index.pug Normal file
Просмотреть файл

@ -0,0 +1,253 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../layout
block append js_doc_ready
include ../js/search.js
block content
- var octicon = viewServices.octicon
- var itemType = 'members'
- var teamAdmin = specificTeamPermissions && specificTeamPermissions.allowAdministration
.container
if team2
.nav
ul.pager.zero-pad-bottom
li.previous
a(href='/' + organization.name + '/teams/' + team2.slug)
span(aria-hidden=true) &larr;
= ' Back to the ' + team2.name + ' team'
if team2AddType
h1 Add #{team2AddType}s to the #{team2.name} team
else
h1 People in the #{team2.name} team
h5= organization.name + ' organization'
else if organization
h1
| People
small= ' in the ' + organization.name + ' GitHub organization'
else
h1 People
p.lead Members of officially managed Microsoft organizations
if reposDataAgeInformation
p.text-primary(style='margin-bottom:24px')
if reposDataAgeInformation.changed
= 'Updated ' + reposDataAgeInformation.changed
if reposDataAgeInformation.updated && reposDataAgeInformation.changed
|, refreshed
else
| Refreshed
if reposDataAgeInformation.updated
= ' ' + reposDataAgeInformation.updated
.row
.col-md-10
//-ul.nav.nav-pills
li(class=(search.sort === 'Alphabet' ? 'active' : ''), title='Alphabetically sorted')
a(href='?sort=Alphabet&tag=' + (tag ? tag : '') + (query.phrase ? '&q=' + query.phrase : ''))
!= octicon('text-size', 20)
| Name
form.form-horizontal#entitySearch(style='margin-top:24px')
.form-group
.col-md-6
div.input-group
input.form-control#inputQuery(
placeholder='Search members',
type='text',
value=query && query.phrase ? query.phrase : null,
style='max-width:400px')
span.input-group-btn
button(
class='btn btn-muted'
type='submit'
style='border-width: 1px') Search
.col-md-6
ul.nav.nav-pills
li.dropdown(role='presentation')
a.dropdown-toggle#typeLabel(data-toggle='dropdown', href='#', role='button', aria-haspopup='true', aria-expanded='false')
= 'Type: '
if query && query.type
strong= query.type
else
strong All
span.caret
ul.dropdown-menu.border-1px-primary(aria-labelledby='typeLabel', style='border-top:0;margin-top:0;padding-top:0;padding-bottom:0')
- var currentType = query && query.type ? query.type : 'all'
li(class={ active: currentType === 'all' })
a(href='?page_number=' + (search.page) + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.twoFactor ? '&twoFactor=' + query.twoFactor : '') + ('&type=all') + (query.phrase ? '&q=' + query.phrase : '')) All
li(class={ active: currentType === 'linked' })
a(href='?page_number=' + (search.page) + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.twoFactor ? '&twoFactor=' + query.twoFactor : '') + ('&type=linked') + (query.phrase ? '&q=' + query.phrase : '')) Linked
li(class={ active: currentType === 'unlinked' })
a(href=href='?page_number=' + (search.page) + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.twoFactor ? '&twoFactor=' + query.twoFactor : '') + ('&type=unlinked') + (query.phrase ? '&q=' + query.phrase : '')) Unlinked
//-li(class={ active: currentType === 'former' })
a(href=href='?page_number=' + (search.page) + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.twoFactor ? '&twoFactor=' + query.twoFactor : '') + ('&type=former') + (query.phrase ? '&q=' + query.phrase : '')) Former
//-li(class={ active: currentType === 'active' })
a(href=href='?page_number=' + (search.page) + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.twoFactor ? '&twoFactor=' + query.twoFactor : '') + ('&type=active') + (query.phrase ? '&q=' + query.phrase : '')) Active employment
//-li(class={ active: currentType === 'serviceAccount' })
a(href=href='?page_number=' + (search.page) + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.twoFactor ? '&twoFactor=' + query.twoFactor : '') + ('&type=serviceAccount') + (query.phrase ? '&q=' + query.phrase : '')) Service accounts
//-li(class={ active: currentType === 'unknownAccount' })
a(href=href='?page_number=' + (search.page) + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.twoFactor ? '&twoFactor=' + query.twoFactor : '') + ('&type=unknownAccount') + (query.phrase ? '&q=' + query.phrase : '')) Linked accounts not in the directory
//-li.dropdown(role='presentation')
a.dropdown-toggle#twoFactorLabel(data-toggle='dropdown', href='#', role='button', aria-haspopup='true', aria-expanded='false')
= 'Two factor: '
if query && query.twoFactor && query.twoFactor === 'off'
strong Two-factor off
else
strong Any 2fa state
span.caret
ul.dropdown-menu.border-1px-primary(aria-labelledby='twoFactorLabel', style='border-top:0;margin-top:0;padding-top:0;padding-bottom:0')
- var currentTwoFactor = query && query.twoFactor ? query.twoFactor : 'all'
li(class={ active: currentTwoFactor === 'all' })
a(href='?page_number=' + (search.page) + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (search.type ? '&type=' + search.type : '') + ('&twoFactor=all') + (query.phrase ? '&q=' + query.phrase : '')) All
li(class={ active: currentTwoFactor === 'off' })
a(href=href='?page_number=' + (search.page) + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (search.type ? '&type=' + search.type : '') + ('&twoFactor=off') + (query.phrase ? '&q=' + query.phrase : '')) 2FA off
if filters.length > 0
p(style='margin-top:24px')
if search.totalItems > 1
strong= search.totalItems.toLocaleString()
| results
else if search.totalItems === 1
strong 1
| result
else
| No results
= ' for '
each filter in filters
= filter.displayPrefix ? filter.displayPrefix + ' ' : ''
strong= filter.displayValue || filter.value
= ' '
= filter.displaySuffix ? filter.displaySuffix + ' ' : ''
a.pull-right.btn.btn-sm.btn-muted-more(href='?')
!= octicon('x', 14)
= ' Clear filter'
hr
if search.totalItems === 0
.well.well-lg
div.text-center
p
!= octicon('organization', 24)
if team2
p.lead The #{team2.name} team doesn't have any people that match.
else if organization
p.lead This organization doesn't have any people that match.
else
p.lead No people match across all managed organizations.
else
nav(style='margin-bottom:48px')
ul.pager
li.previous(class=(search.page > 1 ? '' : 'disabled'))
a(href='?page_number=' + (search.page-1) + (query.twoFactor ? '&twoFactor=' + query.twoFactor : '') + (search.sort ? '&sort=' + search.sort : '') + (query.type ? '&type=' + query.type : '') + (query.phrase ? '&q=' + query.phrase : ''))
span(aria-hidden="true") &larr; Previous
li
if search.totalItems == 1
| One member
else
| #{search.pageFirstItem.toLocaleString()} - #{search.pageLastItem.toLocaleString()} of #{search.totalItems.toLocaleString()} #{itemType}
li.next(class=(search.page < search.totalPages ? '' : 'disabled'))
a(href='?page_number=' + (search.page+1) + (query.twoFactor ? '&twoFactor=' + query.twoFactor : '') + (search.sort ? '&sort=' + search.sort : '') + (query.type ? '&type=' + query.type : '') + (query.phrase ? '&q=' + query.phrase : ''))
span(aria-hidden="true") Next &rarr;
.row.vertical-pad-bottom
.col-sm-8
.col-sm-4
if !organization
h6 Memberships
each person in search.members
- var link = person.link
- var account = person.account ? person.account : person
- var corporate = person.corporate;
- var serviceAccount = person.link && person.link.serviceAccount
- var shorthandName = corporate && corporate.preferredName ? corporate.preferredName : (link ? (link.aadname || account.login) : account.login);
- var corporateIdentity = corporate && corporate.alias ? corporate.alias : (link ? link.aadupn : null)
- var email = corporate ? corporate.emailAddress || corporate.userPrincipalName : null
.row.vertical-pad-bottom
.col-sm-8
div.horizontal-space-right.vertical-space.pull-left(style='width:48px;height:48px;display:block;vertical-align:middle')
if account.avatar_url
img(src=account.avatar_url + '&s=96', style='width:48px;height:48px', title='Avatar of ' + shorthandName)
div(style='display:block;vertical-align:middle')
h4
a(href='https://github.com/' + account.login, target='_new')= shorthandName
//-if !link
= ' '
.label.label-danger Not linked
if team2AddType && person.isTeamMember
= ' '
.label.label-primary.shrink66 Team member
ul.list-inline
if shorthandName && shorthandName !== account.login
li
span(title=account.login + ' is the GitHub username for ' + shorthandName)= account.login
if !link
li
.label.label-danger Not linked
if corporateIdentity
if link && !corporate
li.text-warning!= octicon('link', 16)
li
span(title=link.aadoid)= link.aadupn
else
li!= octicon('link', 16)
li
span(title=corporateIdentity + ' is the corporate identity for ' + shorthandName)= corporateIdentity
//- just corporate e-mails here, not user emails
if email
li
a(href='mailto:' + email, title='Send corporate email to ' + email)
!= octicon('mail', 16)
if serviceAccount
li!= octicon('hubot', 16)
li Service account
if team2AddType && teamAdmin
form(action=teamUrl + team2AddType + 's/add', method='post')
input(type='hidden', name='username', value=account.login)
input.btn.btn-sm.btn-muted(
type='submit',
onclick='return confirm(\'Are you sure that you want to add ' + account.login + ' as a team ' + team2AddType + '?\');',
value= 'Add as ' + team2.name + ' team ' + team2AddType)
if team2RemoveType && teamAdmin
form(action=teamUrl + team2RemoveType + 's/remove', method='post')
input(type='hidden', name='username', value=account.login)
input.btn.btn-sm.btn-muted(
type='submit',
onclick='return confirm(\'Are you sure that you want to remove ' + account.login + ' from the team?\');',
value= 'Remove from ' + team2.name + ' team')
.col-sm-2
if !organization && person.orgs
ul.list-unstyled
each values, _org_ in person.orgs
li= _org_
.col-sm-2
//- Temporary, adding a direct link; the user would still need to be a global sudoer to use the linked page
if lightupSudoerLink
a.btn.btn-sm.btn-default(target='_new', href='/organization/whois/github/' + account.login) Manage account
nav
ul.pager
li.previous(class=(search.page > 1 ? '' : 'disabled'))
a(href='?page_number=' + (search.page-1) + (query.twoFactor ? '&twoFactor=' + query.twoFactor : '') + (search.sort ? '&sort=' + search.sort : '') + (query.type ? '&type=' + query.type : '') + (query.phrase ? '&q=' + query.phrase : ''))
span(aria-hidden="true") &larr; Previous
li
h4(style="display:inline")
| Page #{search.page} of #{search.totalPages}
li.next(class=(search.page < search.totalPages ? '' : 'disabled'))
a(href='?page_number=' + (search.page+1) + (query.twoFactor ? '&twoFactor=' + query.twoFactor : '') + (search.sort ? '&sort=' + search.sort : '') + (query.type ? '&type=' + query.type : '') + (query.phrase ? '&q=' + query.phrase : ''))
span(aria-hidden="true") Next &rarr;
hr
p The presence of people in this list does not imply that they are an employee.

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

@ -5,19 +5,25 @@
extends layout
//- Conditions for this page:
// - linked
// - using AAD-primary authentication
// - no stored GitHub token
block content
div.container
//- Conditions for this page:
// - linked
// - using AAD-primary authentication
// - no stored GitHub token
h1 Please sign in with GitHub
p.lead It's been a while since you signed in with GitHub.
p We need to validate your account. Please sign in with your <large>#{expectedUsername}</large> GitHub username.
if migratedOpenSourceHubUser !== undefined
h1 Welcome
else
h1 Please sign in with GitHub
if migratedOpenSourceHubUser !== undefined
p.lead Please sign in with GitHub
p Your account has been migrated from the Open Source Hub to the new GitHub management experience for Microsoft.
p Since this is the first time you are using this new app, we need you to authenticate with your "#{expectedUsername}" GitHub account.
else
p.lead This application needs to connect to your GitHub account to continue.
.vertical-space
p
a.btn.btn-primary(href='/signin/github') Sign In
a.btn.btn-lg.btn-primary(href='/signin/github') Authenticate with GitHub
| &nbsp; &nbsp; &nbsp;
a.btn.btn-default(href='/signout') Cancel
a.btn.btn-lg.btn-default(href='/signout') Sign out

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

@ -0,0 +1,57 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends layout
//- link, username
block content
div.container
h2 You already have a linked GitHub username #{link.ghu}
p You are not signed in as your linked GitHub account right now. This may happen if you have lost your GitHub two-factor authentication recovery codes. Even GitHub support is not able to restore an account secured with 2FA if the recovery codes are lost.
p Either unlink your old account to link the new account instead, or sign out of the incorrect account.
div.row
div.col-sm-6.col-md-6.col-lg-6
div.horizontal-pad.vertical-space(style='border:4px solid #ddd')
div
h4 LINKED ACCOUNT
h2= link.ghu
p GitHub Account
a.btn.btn-sm.btn-muted(href='https://github.com/' + link.ghu, target='_new')
| View #{link.ghu} GitHub Profile
form(method='post').vertical-space
input(type='hidden', name='unlink', value=link.ghid)
- var isConfirming = confirming !== undefined
- var buttonClass = confirming ? 'btn-danger' : 'btn-default'
if isConfirming
p.text-danger Please confirm that you are ready to unlink this GitHub account. It will lose access to any and all corporate organizations, teams and private repos.
input(type='hidden', name='confirm', value=link.ghid)
input.btn.btn-lg(class=buttonClass, type='submit', value=isConfirming ? `Yes, unlink ${link.ghu}` : `Unlink ${link.ghu}`)
if link.joinedDate
h5
| Linked&nbsp;
time(datetime=link.joinedDate.toISOString())= link.joinedDate.toDateString()
div.col-sm-6.col-md-6.col-lg-6
div.horizontal-pad.vertical-space(style='border:4px solid #ddd')
div
h4.text-primary CURRENTLY SIGNED IN
h2= user.github.username
p GitHub Account
p
a.btn.btn-sm.btn-muted(href='https://github.com/' + user.github.username, target='_new')
| View #{user.github.username} GitHub Profile
if allowAdditionalAccountLink === true
form(method='post').vertical-space
input(type='hidden', name='link', value=user.github.id)
input.btn.btn-lg.btn-success(type='submit', value=`Link additional account ${user.github.username}`)
p
a.btn.btn-lg.btn-primary(href='/signout/github/?redirect=github') Sign out of GitHub
if config && config.brand && config.brand.supportMail
p.vertical-space
| If you have any questions, please ping&nbsp;
a.btn.btn-sm.btn-muted(href='mailto:' + config.brand.supportMail)= config.brand.supportMail

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

@ -0,0 +1,20 @@
var engine = new Bloodhound({
name: 'allOrgsRepos',
local: [],
remote: {
url: '/repos/search?q=%QUERY',
wildcard: '%QUERY',
},
datumTokenizer: function(d) {
return Bloodhound.tokenizers.whitespace(d.val);
},
queryTokenizer: Bloodhound.tokenizers.whitespace,
});
engine.initialize();
$('.typeahead').typeahead(null, {
name: 'allOrgsRepos',
displayKey: 'val',
source: engine,
});

319
views/repos/index.pug Normal file
Просмотреть файл

@ -0,0 +1,319 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../layout
//-block append js
script(type='text/javascript', src='/js/typeahead.bundle.min.js')
block append js_doc_ready
include ../js/search.js
//-include autocomplete.js
block content
//- View services
- var languageColor = viewServices.languageColor
- var octicon = viewServices.octicon
- var fileSize = viewServices.fileSize
//- View variables and options
- var specificTeamId = specificTeam ? specificTeam.id : null
- var specificTeamView = specificTeamPermissions && specificTeamId
.container
//-form#search-container
input.typeahead.search-input.typeahead-form-control(type='text', placeholder='Search repositories', spellcheck='false', autocomplete='off')
if specificTeam
.nav
ul.pager.zero-pad-bottom
li.previous
a(href='/' + organization.name + '/teams/' + specificTeam.slug)
span(aria-hidden=true) &larr;
= ' Back to the ' + specificTeam.name + ' team'
//- Scenario-based heading
if organization && specificTeam
h3
= specificTeam.name + ' team repositories'
if specificTeamPermissions && specificTeamPermissions.allowAdministration
= ' '
.label.label-warning.shrink66(
title=specificTeamPermissions.sudo ? 'As a sudo maintainer, you can administer team settings in this application but not directly on GitHub.com' : 'As a team maintainer you can administer team settings in this application and directly on GitHub.com'
)= specificTeamPermissions.sudo ? 'Sudo maintainer' : 'Team maintainer'
h5= organization.name + ' organization'
else if organization
h3= organization.name + ' repositories'
else
h1 Repositories
p.lead Across all officially managed Microsoft organizations
//- If the age of the data is known
if reposDataAgeInformation
p.text-primary(style='margin-bottom:24px')
if reposDataAgeInformation.changed
= 'Updated ' + reposDataAgeInformation.changed
if reposDataAgeInformation.updated && reposDataAgeInformation.changed
|, refreshed
else
| Refreshed
if reposDataAgeInformation.updated
= ' ' + reposDataAgeInformation.updated
.row
.col-md-8
ul.nav.nav-pills
li(class=(search.sort === 'Pushed' ? 'active' : ''))
a(href='?sort=Pushed&tag=' + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? tag : '') + (query.tt ? '&tt=' + query.tt : '') + (query.phrase ? '&q=' + query.phrase : ''), title='Sort by commit pushed date/time')
!= octicon('git-commit', 20)
| &nbsp;Recent
li(class=(search.sort === 'Stars' ? 'active' : ''))
a(href='?sort=Stars&tag=' + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? tag : '') + (query.tt ? '&tt=' + query.tt : '') + (query.phrase ? '&q=' + query.phrase : ''), title='Sort by stars')
//- i.glyphicon.glyphicon-star
!= octicon('star', 16)
| Stars
li(class=(search.sort === 'Forks' ? 'active' : ''))
a(href='?sort=Forks&tag=' + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? tag : '') + (query.tt ? '&tt=' + query.tt : '') + (query.phrase ? '&q=' + query.phrase : ''), title='Sort by forks')
!= octicon('repo-forked', 14)
| Forks
li(class=(search.sort === 'Alphabet' ? 'active' : ''), title='Sort by repo name')
a(href='?sort=Alphabet&tag=' + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? tag : '') + (query.tt ? '&tt=' + query.tt : '') + (query.phrase ? '&q=' + query.phrase : ''))
//- i.glyphicon.glyphicon-sort-by-alphabet
!= octicon('text-size', 20)
| Name
//-i.glyphicon.glyphicon-triangle-bottom
li(class=(search.sort === 'Updated' ? 'active' : ''))
a(href='?sort=Updated&tag=' + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? tag : '') + (query.tt ? '&tt=' + query.tt : '') + (query.phrase ? '&q=' + query.phrase : ''), title='Sort by updated date')
!= octicon('calendar', 20)
| Updated
li(class=(search.sort === 'Created' ? 'active' : ''))
a(href='?sort=Created&tag=' + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? tag : '') + (query.tt ? '&tt=' + query.tt : '') + (query.phrase ? '&q=' + query.phrase : ''), title='Sort by created date')
!= octicon('zap', 12)
| Created
li(class=(search.sort === 'Size' ? 'active' : ''))
a(href='?sort=Size&tag=' + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? tag : '') + (query.tt ? '&tt=' + query.tt : '') + (query.phrase ? '&q=' + query.phrase : ''), title='Sort by approximate repo size')
!= octicon('database', 16)
| Size
form.form-horizontal#entitySearch(style='margin-top:24px')
.form-group
.col-md-5
div.input-group
input.form-control#inputQuery(
placeholder='Search repositories...',
type='text',
value=query && query.phrase ? query.phrase : null,
style='max-width:400px')
span.input-group-btn
button(
class='btn btn-muted'
type='submit'
style='border-width: 1px') Search
.col-md-7
ul.nav.nav-pills
li.dropdown(role='presentation')
a.dropdown-toggle#typeLabel(data-toggle='dropdown', href='#', role='button', aria-haspopup='true', aria-expanded='false')
= 'Type: '
if query && query.type
strong= query.type
else
strong All
span.caret
ul.dropdown-menu.border-1px-primary(aria-labelledby='typeLabel', style='border-top:0;margin-top:0;padding-top:0;padding-bottom:0')
- var currentType = query && query.type ? query.type : 'all'
li(class={ active: currentType === 'all' })
a(href='?page_number=' + (search.page) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.tt ? '&tt=' + query.tt : '') + (query.language ? '&language=' + search.observedLanguagesEncoded.get(query.language) : '') + ('&type=all') + (query.phrase ? '&q=' + query.phrase : '')) All
li(class={ active: currentType === 'public' })
a(href='?page_number=' + (search.page) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.tt ? '&tt=' + query.tt : '') + (query.language ? '&language=' + search.observedLanguagesEncoded.get(query.language) : '') + ('&type=public') + (query.phrase ? '&q=' + query.phrase : '')) Public
li(class={ active: currentType === 'private' })
a(href=href='?page_number=' + (search.page) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.tt ? '&tt=' + query.tt : '') + (query.language ? '&language=' + search.observedLanguagesEncoded.get(query.language) : '') + ('&type=private') + (query.phrase ? '&q=' + query.phrase : '')) Private
li(class={ active: currentType === 'source' })
a(href=href='?page_number=' + (search.page) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.tt ? '&tt=' + query.tt : '') + (query.language ? '&language=' + search.observedLanguagesEncoded.get(query.language): '') + ('&type=source') + (query.phrase ? '&q=' + query.phrase : '')) Sources
li(class={ active: currentType === 'fork' })
a(href=href='?page_number=' + (search.page) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.tt ? '&tt=' + query.tt : '') + (query.language ? '&language=' + search.observedLanguagesEncoded.get(query.language) : '') + ('&type=fork') + (query.phrase ? '&q=' + query.phrase : '')) Forks
li.dropdown(role='presentation')
a.dropdown-toggle#languageLabel(data-toggle='dropdown', href='#', role='button', aria-haspopup='true', aria-expanded='false')
= 'Language: '
if query && query.language
strong= query.language
else
strong All
span.caret
ul.dropdown-menu.border-1px-primary(aria-labelledby='languageLabel', style='border-top:0;margin-top:0;padding-top:0;padding-bottom:0')
- var currentLanguage = query && query.language ? query.language : 'all'
li(class={ active: currentLanguage === 'all' })
a(href='?page_number=' + (search.page) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + ('&language=all') + (query.type ? '&type=' + query.type : '') + (query.tt ? '&tt=' + query.tt : '') + (query.phrase ? '&q=' + query.phrase : '')) All
if search && search.observedLanguages
each language in Array.from(search.observedLanguages).sort()
li(class={ active: currentLanguage === language.toLowerCase() })
a(href='?page_number=' + (search.page) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + ('&language=' + search.observedLanguagesEncoded.get(language)) + (query.type ? '&type=' + query.type : '') + (query.tt ? '&tt=' + query.tt : '') + (query.phrase ? '&q=' + query.phrase : ''))= language
//- Let the user filter by the type of permission they have, unless this is a team's specific repos
if !specificTeamId
li.dropdown(role='presentation')
a.dropdown-toggle#teamTypeLabel(data-toggle='dropdown', href='#', role='button', aria-haspopup='true', aria-expanded='false')
= 'Teams: '
if query && query.tt
strong= query.tt
else
strong Any / all
span.caret
ul.dropdown-menu.border-1px-primary(aria-labelledby='teamTypeLabel', style='border-top:0;margin-top:0;padding-top:0;padding-bottom:0')
- var currentTeamType = query && query.tt ? query.tt : 'all'
li(class={ active: currentTeamType === 'all' })
a(href='?page_number=' + (search.page) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.language ? '&language=' + search.observedLanguagesEncoded.get(query.language) : '') + ('&tt=all') + (query.type ? '&type=' + query.type : '') + (query.phrase ? '&q=' + query.phrase : '')) All
li(class={ active: currentTeamType === 'myadmin' })
a(href='?page_number=' + (search.page) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.language ? '&language=' + search.observedLanguagesEncoded.get(query.language) : '') + ('&tt=myadmin') + (query.type ? '&type=' + query.type : '') + (query.phrase ? '&q=' + query.phrase : '')) Teams with admin
li(class={ active: currentTeamType === 'mywrite' })
a(href=href='?page_number=' + (search.page) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.language ? '&language=' + search.observedLanguagesEncoded.get(query.language) : '') + ('&tt=mywrite') + (query.type ? '&type=' + query.type : '') + (query.phrase ? '&q=' + query.phrase : '')) Teams you can write with
li(class={ active: currentTeamType === 'myread' })
a(href=href='?page_number=' + (search.page) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.language ? '&language=' + search.observedLanguagesEncoded.get(query.language): '') + ('&tt=myread') + (query.type ? '&type=' + query.type : '') + (query.phrase ? '&q=' + query.phrase : '')) Teams you can pull via
li(class={ active: currentTeamType === 'teamless' })
a(href=href='?page_number=' + (search.page) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (search.sort ? '&sort=' + search.sort : '') + (query.language ? '&language=' + search.observedLanguagesEncoded.get(query.language) : '') + ('&tt=teamless') + (query.type ? '&type=' + query.type : '') + (query.phrase ? '&q=' + query.phrase : '')) No teams
if filters.length
p(style='margin-top:24px')
if search.totalRepos > 1
strong= search.totalRepos.toLocaleString()
| results
else if search.totalRepos === 1
strong 1
| result
else
| No results
= ' for '
each filter in filters
= filter.displayPrefix ? filter.displayPrefix + ' ' : ''
strong= filter.displayValue || filter.value
= ' '
= filter.displaySuffix ? filter.displaySuffix + ' ' : ''
a.pull-right.btn.btn-sm.btn-muted-more(href='?')
!= octicon('x', 14)
= ' Clear filter'
hr
if search.totalRepos === 0
.well.well-lg
div.text-center
p
!= octicon('repo', 24)
if organization
p.lead This organization doesn't have any repositories that match.
else
p.lead No repositories match across all Microsoft organizations.
else
nav(style='margin-bottom:48px')
ul.pager
li.previous(class=(search.page > 1 ? '' : 'disabled'))
a(href='?page_number=' + (search.page-1) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (query.tt ? '&tt=' + query.tt : '') + (search.sort ? '&sort=' + search.sort : '') + (query.language ? '&language=' + search.observedLanguagesEncoded.get(query.language) : '') + (query.type ? '&type=' + query.type : '') + (query.phrase ? '&q=' + query.phrase : ''))
span(aria-hidden="true") &larr; Previous
li
| #{search.pageFirstRepo.toLocaleString()} - #{search.pageLastRepo.toLocaleString()} of #{search.totalRepos.toLocaleString()}
li.next(class=(search.page < search.totalPages ? '' : 'disabled'))
a(href='?page_number=' + (search.page+1) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (query.tt ? '&tt=' + query.tt : '') + (search.sort ? '&sort=' + search.sort : '') + (query.language ? '&language=' + search.observedLanguagesEncoded.get(query.language) : '') + (query.type ? '&type=' + query.type : '') + (query.phrase ? '&q=' + query.phrase : ''))
span(aria-hidden="true") Next &rarr;
each repo in search.repos
- var quickOrgName = repo.full_name.replace('/' + repo.name, '')
- var repoOrgName = repo.organization ? repo.organization.name : quickOrgName
- var localOrgName = organization ? organization.name : repoOrgName
.repo(id=repo.name, style='padding-bottom:36px;display:block')
h3
if showIds
= repo.id + ' '
a(href='/' + localOrgName + '/repos/' + repo.name)= repo.name
if repo.private === true
| &nbsp;
.label.label-warning.shrink66(title='This is a private repository and not open source.') Private
if repo.permissions && specificTeam
= ' '
if repo.permissions.admin
.label.label-danger.shrink66(title='The ' + specificTeam.name + ' team grants permission to administer the repo') Admin
else if repo.permissions.push
.label.label-warning.shrink66(title='The ' + specificTeam.name + ' team grants permission to commit directly to the repo and accept pull requests') Write
else if repo.permissions.pull
.label.label-success.shrink66(title='The ' + specificTeam.name + ' team grants permission to clone/read/see the repo') Read
if repo.description
p=repo.description
small
ul.list-inline.list-horizontal-space
if repo.language
li
span(style={color: languageColor(repo.language)})
!= octicon('primitive-dot', 10)
= ' ' + repo.language
if repo.stargazers_count
li
!= octicon('star', 15)
= ' ' + repo.stargazers_count.toLocaleString()
if repo.forks_count
li
!= octicon('repo-forked', 12)
= ' ' + repo.forks_count.toLocaleString()
//- I'm using "pushed" as the "updated" to try and match what
//- it feels like GH does on their homepage...
if repo.momentDisplay.pushed
li= 'Updated ' + repo.momentDisplay.pushed
//- Looks like GitHub doesn't really show this value
//-if repo.momentDisplay.updated
li
small= 'Updated ' + repo.momentDisplay.updated
li &nbsp;
if repo.momentDisplay.created
li= 'Created ' + repo.momentDisplay.created
if repo.size
li
!= octicon('database', 13)
= ' ' + fileSize(repo.size * 1024)
if specificTeam && teamUrl && specificTeamPermissions && specificTeamPermissions.allowAdministration
ul.list-inline
li
form(method='post', action=teamUrl + 'repos/' + repo.name + '/remove')
p: input.btn.btn-sm.btn-muted(
type='submit',
onclick='return confirm(\'Are you sure that you want to remove access to this repo?\');'
value='Remove team access to repo')
li: a.btn.btn-sm.btn-muted(
href='#',
onclick='alert(\'To edit the permission level, a repo admin must perform this operation directly on GitHub.\'); return false;') Edit permission
if !organization
h6= repo.full_name.replace('/' + repo.name, '') + ' organization'
nav
ul.pager
li.previous(class=(search.page > 1 ? '' : 'disabled'))
a(href='?page_number=' + (search.page-1) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (query.tt ? '&tt=' + query.tt : '') + (search.sort ? '&sort=' + search.sort : '') + (query.language ? '&language=' + search.observedLanguagesEncoded.get(query.language) : '') + (query.type ? '&type=' + query.type : '') + (query.phrase ? '&q=' + query.phrase : ''))
span(aria-hidden="true") &larr; Previous
li
h4(style="display:inline")
| Page #{search.page} of #{search.totalPages}
li.next(class=(search.page < search.totalPages ? '' : 'disabled'))
a(href='?page_number=' + (search.page+1) + (specificTeamId ? '&teamRepos=' + specificTeamId : '') + (tag ? '&tag=' + tag : '') + (query.tt ? '&tt=' + query.tt : '') + (search.sort ? '&sort=' + search.sort : '') + (query.language ? '&language=' + search.observedLanguagesEncoded.get(query.language) : '') + (query.type ? '&type=' + query.type : '') + (query.phrase ? '&q=' + query.phrase : ''))
span(aria-hidden="true") Next &rarr;
.col-md-3.col-md-offset-1
div(style='margin-left:12px')
if orgs
h4 Need to create a repo?
p To create a new repo, first you need to select which organization will host it.
hr
h4 Organizations
ul.list-unstyled
each org in orgs
li(style='margin-bottom:8px')
a.btn.btn-muted-more.btn-sm(
href='/' + org.name + '/repos'
)= org.name

91
views/repos/legacyCla.pug Normal file
Просмотреть файл

@ -0,0 +1,91 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../layout
block content
- var repo = repository
.container
.row: .col-sm-12
.nav
ul.pager.zero-pad-bottom
li.previous
a(href='/' + organization.name + '/repos/' + repository.name)
span(aria-hidden=true) &larr;
= ' Back to the ' + repository.name + ' repository'
- var hugeHeading = false
h1(class={huge: hugeHeading})
a(href='https://github.com/' + repo.full_name, target="_blank")= repo.name
if repo.private === true
| &nbsp;
.label.label-warning(class={shrink66: !hugeHeading, shrink50: hugeHeading}) Private
h6= repo.full_name.replace('/' + repo.name, '') + ' organization'
//-if repo.description
p.lead=repo.description
hr
h1 Contribution license agreement settings
.row
.col-md-10
if claSettings && claSettings.enabled
- var cla = claSettings
ul.list-inline.list-horizontal-space
li
| Status
br
strong Active
if cla.mails
li
| Notifying
br
strong= cla.mails
if cla.legalEntity
li
| Legal entity
br
strong= cla.legalEntity
if cla.updatedOn && cla.updatedOn.fromNow
li
| Configuration updated
br
strong= cla.updatedOn.fromNow()
//-if cla.webhookUrl
li
| Webhook
br
strong= cla.webhookUrl
else
p This repository does not currently have the CLA enabled.
h3 #{claSettings && claSettings.enabled ? 'Update' : 'Enable'} settings
form.form-horizontal(method='post')
h4 Legal entity
if claSettings && claSettings.enabled
if claSettings.legalEntity
p: strong= claSettings.legalEntity
p The legal entity cannot be changed after the fact. Please contact operations if this should change.
else
if claSettings && claSettings.teams
select.form-control(name='legalEntity')
each team, key in claSettings.teams
option(value=key)= key
h4 Pull request notifications
p To receive notification whenever a pull request is created, provide the e-mail addresses to notify. This address needs to be able to accept e-mail from outside the organization.
p: input.form-control(type='text', name='emails', placeholder='Optional comma-separated list of e-mail addresses to set', value= claSettings ? claSettings.mails : null)
p: input.btn.btn-primary(type='submit', value='Set')
hr
p.
Contribution License Agreements (CLAs) make accepting contributions and working with
the open source community much easier while protecting contributors and copyright holders
including the legal entity.
p.
The CLA bots detect whether someone is contributing a large enough change to require a CLA
to be signed, and in the case that it is an employee (or contractor making a contribution
within the scope of their statement of work), no CLA may be required, allowing the team to
integrate the change even sooner.

506
views/repos/repo.pug Normal file
Просмотреть файл

@ -0,0 +1,506 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../layout
block additional_head
link(href='/css/c3.min.css', rel='stylesheet')
script(src='/js/d3.min.js')
script(src='/js/c3.min.js')
block js_doc_ready
include ../js/metrics.js
| displayRepoMetrics(#{repo.id}, #{organization.id});
mixin simplePersonView(account)
- var shorthandName = account.login
div.horizontal-space-right.vertical-space.pull-left(style='width:36px;height:36px;display:block;vertical-align:middle')
if account.avatar_url
img(src=account.avatar_url + '&s=96', style='width:36px;height:36px', title='Avatar of ' + shorthandName)
div(style='display:block;vertical-align:middle')
h4
a(href='/people?q=' + account.login)= shorthandName
//-ul.list-inline
if shorthandName && shorthandName !== account.login
li
span(title=account.login + ' is the GitHub username for ' + shorthandName)= account.login
if corporateIdentity
if link && !corporate
li.text-warning!= octicon('link', 16)
li
span(title=link.aadoid)= link.aadupn
else
li!= octicon('link', 16)
li
span(title=corporateIdentity + ' is the corporate identity for ' + shorthandName)= corporateIdentity
//- just corporate e-mails here, not user emails
if email
li
a(href='mailto:' + email, title='Send corporate email to ' + email)
!= octicon('mail', 16)
if serviceAccount
li!= octicon('hubot', 16)
li Service account
mixin teamsList(teams, hideJoinOption)
if teams && teams.length > 0
table(style='width:100%')
tbody
each permission in teams
- var team = permission.team
tr
td
ul.list-inline
- var isMember = teamSets && teamSets.member.has(team.id)
//- formerly: permission.relativeJoinLink
if hideJoinOption
li
ul.list-unstyled
li: strong= team.name
li: p= team.description
else
li
a.btn.btn-sm.btn-muted-more(href=permission.relativePortalLink, title=team.description)= team.name
if teamSets && teamSets.maintained.has(team.id)
li.text-primary You're a maintainer
else if teamSets && teamSets.member.has(team.id)
li.text-primary You're a member
if team.description && !hideJoinOption
p= team.description
else
p No teams with this permission.
block content
//- Services
- var languageColor = viewServices.languageColor
- var octicon = viewServices.octicon
- var fileSize = viewServices.fileSize
//- View constants
- var maxReaders = 10
//- Variables
- var githubUrl = 'https://github.com/' + repo.full_name
- var cloneUrl = repo.clone_url || repo.otherFields.clone_url
- var sshUrl = repo.ssh_url || repo.otherFields.ssh_url
- var admin = repoPermissions && repoPermissions.allowAdministration
.container
.row: .col-md-12
if fromReposPage
.nav
ul.pager.zero-pad-bottom
li.previous
a(href='javascript:window.history.back()')
span(aria-hidden=true) &larr;
= ' Back'
- var hugeHeading = repo.name.length < 33
h1(class={huge: hugeHeading})
a(href='https://github.com/' + repo.full_name, target="_blank")= repo.name
if repo.private === true
| &nbsp;
.label.label-warning(class={shrink66: !hugeHeading, shrink50: hugeHeading}) Private
h6= repo.full_name.replace('/' + repo.name, '') + ' organization'
if repo.description
p.lead=repo.description
.row
.col-md-8
small
ul.list-inline.list-horizontal-space
//- NOTES:
//- * Can minimize some; 10,827 becomes 10.8k, for example
if repo.language
li
span(style={color: languageColor(repo.language)})
!= octicon('primitive-dot', 10)
= ' ' + repo.language
if repo.license && repo.license.featured && repo.license.name
li
!= octicon('law', 15)
= ' ' + repo.license.name
if repo.stargazers_count
li
!= octicon('star', 15)
= ' ' + repo.stargazers_count.toLocaleString()
if repo.forks_count
li
!= octicon('repo-forked', 12)
= ' ' + repo.forks_count.toLocaleString()
if repo.size
li
!= octicon('database', 13)
= ' ' + fileSize(repo.size * 1024)
ul.list-inline(style='margin-top:24px;margin-bottom:48px')
li: a.btn.btn-sm.btn-muted-more(href=githubUrl, target="_blank", title='View ' + repo.full_name + ' on GitHub.com')
= 'Open on GitHub.com '
!= octicon('mark-github', 18)
if cloneUrl
li: a.btn.btn-sm.btn-muted-more(href='https://github.com/' + repo.full_name, target="_blank") HTTPS clone
if sshUrl
li: a.btn.btn-sm.btn-muted-more(href='https://github.com/' + repo.full_name, target="_blank") SSH clone
if repo.homepage
li: a.btn.btn-sm.btn-muted-more(href=repo.homepage, target='_new', title=repo.homepage) Homepage
if repo.moment
//-h2 Timeline
ul.list-inline.list-horizontal-space
if repo.moment.pushed_at
li
| Commits pushed
br
strong= repo.moment.pushed_at
if repo.moment.updated_at
li
| Updated
br
strong= repo.moment.updated_at
if repo.moment.created_at
li
| Created
br
strong= repo.moment.created_at
if extensions
//- Extensions
if extensions.cla
- var cla = extensions.cla
hr
h2 Contribution license agreements
if !extensions.cla.supported
p.
The #{organization.name} organization is not currently configured for
CLA. Please reach out if you believe this is incorrect. It is
important for all organizations to have CLA support enabled.
else
if !cla.enabled
.alert.alert-warning
p.
#[strong This repository does not currently have the CLA bot enabled]
#[br]
The repository administrators and writers should not accept pull requests from unknown GitHub users until the CLA is enabled.
p
else
if cla.legalEntity
p The CLA is enabled for the #{cla.legalEntity} legal entity.
ul.list-inline.list-horizontal-space
if cla.mails
li
| Notifying
br
strong= cla.mails
if cla.legalEntity
li
| Legal entity
br
strong= cla.legalEntity
if cla.updatedOn && cla.updatedOn.fromNow
li
| Configuration updated
br
strong= cla.updatedOn.fromNow()
ul.list-inline
if admin
li: a.btn.btn-sm.btn-default(href='/' + repo.organization.name + '/repos/' + repo.name + '/extensions/cla') Configure the #{cla.legalEntity} CLA
if cla.learnMoreUrl
li: a.btn.btn-sm.btn-muted-more(href=cla.learnMoreUrl, target='_blank') Learn more
.col-md-4
if admin
h3 Repository management
ul.list-unstyled.list-vspace
li
a.btn.btn-sm(
class=repoPermissions.admin ? 'btn-primary' : 'btn-muted-more',
href=githubUrl,
target="_blank",
title='View ' + repo.full_name + ' on GitHub.com')
= 'Manage on GitHub.com '
!= octicon('mark-github', 18)
if !repoPermissions.admin
li: p.
You are not a GitHub repo administrator for this repo and may not be able to manage all settings directly on GitHub.
li: a.btn.btn-sm.btn-muted-more(
href='https://github.com/' + repo.full_name + '/settings',
target='_blank'
) GitHub Settings
li: a.btn.btn-sm.btn-muted-more(
href='https://github.com/' + repo.full_name + '/settings/collaboration',
target='_blank'
) Outside collaborators
li: a.btn.btn-sm.btn-muted-more(
href='https://github.com/' + repo.full_name + '/settings/collaboration',
target='_blank'
) Team permissions
li: a.btn.btn-sm.btn-muted-more(
href='https://github.com/' + repo.full_name + '/settings/hooks',
target='_blank'
) Webhooks
if extensions
h4 Services
ul.list-unstyled.list-vspace
if extensions.cla && extensions.cla.supported
li: a.btn.btn-sm.btn-muted-more(href='/' + repo.organization.name + '/repos/' + repo.name + '/extensions/cla') Configure the #{cla.legalEntity} CLA
if !repo.private && extensions.npm && extensions.npm.supported
li: a.btn.btn-sm.btn-muted-more(href='/' + repo.organization.name + '/repos/' + repo.name + '/extensions/npm') NPM publishing
#metrics
hr
h3 Metrics
.row
.col-md-6
ul.list-unstyled.list-vspace
li
a(href='https://github.com/' + repo.full_name + '/graphs/contributors', target='_new')
!= octicon('organization', 20)
= ' Contributors: '
span#contributors
li
a(href='https://github.com/' + repo.full_name + '/watchers', target='_new')
!= octicon('eye', 20)
= ' Subscribers: '
span#subscribers
li
a(href='https://github.com/' + repo.full_name + '/issues', target='_new')
!= octicon('issue-opened', 20)
= ' Open issues: '
span#openIssues
li
a(href='https://github.com/' + repo.full_name + '/issues?q=is%3Aissue+is%3Aclosed', target='_new')
!= octicon('issue-closed', 20)
= ' Closed issues: '
span#closedIssues
li Pull requests:&nbsp;
strong: span#pullRequests
li Closed pull requests:&nbsp;
strong: span#closedPullRequests
li Open pull requests:&nbsp;
strong: span#openPullRequests
li Average days taken to close pull requests:&nbsp;
strong: span#avgDaysToClosePRs
li Average days taken for first response to pull requests:&nbsp;
strong: span#avgDaysForFirstResponseToPRs
li Pull requests opened today:&nbsp;
strong: span#prsOpenedToday
li Pull requests closed today:&nbsp;
strong: span#prsClosedToday
li Average days taken to close issues:&nbsp;
strong: span#avgDaysToCloseIssues
li Average days taken for first response to open issues:&nbsp;
strong: span#avgDaysForFirstResponseToIssues
li Issues opened today:&nbsp;
strong: span#openedIssuesToday
li Issues closed today:&nbsp;
strong: span#closedIssuesToday
li Commits:&nbsp;
strong: span#commits
li Lines committed:&nbsp;
strong: span#linesCommitted
li Commits made today:&nbsp;
strong: span#commitsToday
li Lines committed today:&nbsp;
strong: span#linesCommittedToday
.col-md-6
#metricsChart
.row: .col-md-12: hr
if permissions
- var zeroTeams = !permissions.pull && !permissions.push && !permissions.admin
.row: .col-md-12
h2 Team permissions
if zeroTeams
p.
#[span.text-danger There are no teams defined for this repo.] Teams are the
GitHub-recommended way to manage repository permissions for organizations. Please
work with your administrators to define a team experience for this repo.
.row
if permissions.pull
.col-md-4
h4 Read #[small Pull]
//-if repo.private
p This is a private repository, so only the following teams have read access.
+teamsList(permissions.pull)
if permissions.push
.col-md-4
h4 Write #[small Accept pull requests]
+teamsList(permissions.push)
if !zeroTeams
.col-md-4
h4 Admin #[small Manage settings]
if permissions.admin
+teamsList(permissions.admin)
else
p.text-danger This repository has no admin teams defined.
if teamBasedPermissions
.row: .col-md-12: h2 Users granted permissions by teams
.row
if teamBasedPermissions.readers && teamBasedPermissions.readers.length
.col-md-4
h3 Readers #[span.badge=teamBasedPermissions.readers.length.toLocaleString()]
if teamBasedPermissions.readers.length > maxReaders
p.
Accounts that can clone and view the repository.
#[span.text-muted Only #{maxReaders} of #{teamBasedPermissions.readers.length.toLocaleString()} accounts with read access are being displayed]
ul.list-unstyled
- var k = 0
each readerCollaborator in teamBasedPermissions.readers
- k++
if k < maxReaders
li
div.clearfix
+simplePersonView(readerCollaborator.user)
if teamBasedPermissions.writers && teamBasedPermissions.writers.length
.col-md-4
h3 Writers #[span.badge=teamBasedPermissions.writers.length.toLocaleString()]
p These accounts have the ability to accept pull requests and directly commit to the repo
ul.list-unstyled
each writerCollaborator in teamBasedPermissions.writers
li
div.clearfix
+simplePersonView(writerCollaborator.user)
if teamBasedPermissions.administrators && teamBasedPermissions.administrators.length
.col-md-4
h3 Administrators #[span.badge=teamBasedPermissions.administrators.length.toLocaleString()]
p Owners of the repo, able to manage repo and team settings
ul.list-unstyled
each adminCollaborator in teamBasedPermissions.administrators
li
div.clearfix
+simplePersonView(adminCollaborator.user)
if outsideCollaborators && outsideCollaborators.length
.row: .col-md-12: h2 Outside collaborators
.row
if outsideCollaboratorsSlice.administrators && outsideCollaboratorsSlice.administrators.length
.col-md-4
h3 Administrators #[span.badge=outsideCollaboratorsSlice.administrators.length.toLocaleString()]
p Owners of the repo, able to manage repo and team settings
ul.list-unstyled
each adminCollaborator in outsideCollaboratorsSlice.administrators
li
div.clearfix
+simplePersonView(adminCollaborator)
if outsideCollaboratorsSlice.writers && outsideCollaboratorsSlice.writers.length
.col-md-4
h3 Writers #[span.badge=outsideCollaboratorsSlice.writers.length.toLocaleString()]
p These accounts have the ability to accept pull requests and directly commit to the repo
ul.list-unstyled
each writerCollaborator in outsideCollaboratorsSlice.writers
li
div.clearfix
+simplePersonView(writerCollaborator)
//- We ignore outsideCollaboratorsSlice.readers for this view
if outsideCollaboratorsSlice.readers && outsideCollaboratorsSlice.readers.length
.col-md-4
h3 Readers #[span.badge=outsideCollaboratorsSlice.readers.length.toLocaleString()]
if outsideCollaboratorsSlice.readers.length > maxReaders
p.
Accounts that can clone and view the repository.
#[span.text-muted Only #{maxReaders} of #{outsideCollaboratorsSlice.readers.length.toLocaleString()} accounts with read access are being displayed]
ul.list-unstyled
- var k = 0
each readerCollaborator in outsideCollaboratorsSlice.readers
- k++
if k < maxReaders
li
div.clearfix
+simplePersonView(readerCollaborator)
if collaboratorsArray && collaboratorsArray.length
.row
.col-md-12
h2 Individual permissions
p.
These are collaborators that have been directly added to this repository. For open source
projects, Outside Collaborators are the GitHub-recommended way to grant contributor
rights to repositories.
p.
In general, members of the organization should not be added as collaborators, as teams
on GitHub are much more flexible.
.row
if collaborators.administrators && collaborators.administrators.length
.col-md-4
h3 Administrators #[span.badge=collaborators.administrators.length.toLocaleString()]
p Owners of the repo, able to manage repo and team settings
ul.list-unstyled
each adminCollaborator in collaborators.administrators
li
div.clearfix
+simplePersonView(adminCollaborator)
if collaborators.writers && collaborators.writers.length
.col-md-4
h3 Writers #[span.badge=collaborators.writers.length.toLocaleString()]
p These accounts have the ability to accept pull requests and directly commit to the repo
ul.list-unstyled
each writerCollaborator in collaborators.writers
li
div.clearfix
+simplePersonView(writerCollaborator)
//- We ignore collaborators.readers for this view
if collaborators.readers && collaborators.readers.length
.col-md-4
h3 Readers #[span.badge=collaborators.readers.length.toLocaleString()]
if collaborators.readers.length > maxReaders
p.
Accounts that can clone and view the repository.
#[span.text-muted Only #{maxReaders} of #{collaborators.readers.length.toLocaleString()} accounts with read access are being displayed]
ul.list-unstyled
- var k = 0
each readerCollaborator in collaborators.readers
- k++
if k < maxReaders
li
div.clearfix
+simplePersonView(readerCollaborator)
if systemPermissions && (systemPermissions.pull || systemPermissions.push || systemPermissions.admin)
.row: .col-md-12
h2 System team permissions
p.
System teams are used by corporate open source automation systems including
Contribution License Agreements and compliance needs.
These teams are not intended for general use but are provided here to help repo admins
understand how GitHub permissions are configured.
.row
if systemPermissions.pull
.col-md-4
h4 Read
+teamsList(systemPermissions.pull, true)
if systemPermissions.push
.col-md-4
h4 Write
+teamsList(systemPermissions.push, true)
if systemPermissions.admin
.col-md-4
h4 Admin
+teamsList(systemPermissions.admin, true)
hr
if repo.id
p
small
if repo.id
= 'GitHub repository ID: ' + repo.id
if repoMetrics
br
| This page contains historical metrics that may be delayed
if reposDataAgeInformation
p.text-primary(style='margin-bottom:24px')
if reposDataAgeInformation.changed
= 'Updated ' + reposDataAgeInformation.changed
if reposDataAgeInformation.updated && reposDataAgeInformation.changed
|, refreshed
else
| Refreshed
if reposDataAgeInformation.updated
= ' ' + reposDataAgeInformation.updated

59
views/reposToolbar.pug Normal file
Просмотреть файл

@ -0,0 +1,59 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
//- THIS PAGE IS MICROSOFT-SPECIFIC
//- DO NOT MERGE THIS PAGE UP TO 'PUBLIC-DEVELOP'
div.navbar.navbar-inverse
div.container-fluid
div.navbar-header
button.navbar-toggle.collapsed(type='button', data-toggle='collapse', data-target='#repos-section-navbar-collapse', aria-expanded='false')
span.sr-only Toggle navigation
span.icon-bar
span.icon-bar
span.icon-bar
div.collapse.navbar-collapse#repos-section-navbar-collapse
ul.nav.navbar-nav(style='margin-left:-30px')
li.dropdown(class={ active: /*reposContext.section === 'org' || */ reposContext.section === 'orgs' })
a.dropbown-toggle(
href=reposContext.org && reposContext.org.name ? '#' : '/',
data-toggle='dropdown',
role='button',
aria-haspopup='true',
aria-expanded='false')
//= reposContext.org && reposContext.org.name ? reposContext.org.name : 'Organizations'
= 'Organizations'
| &nbsp;
span.caret
ul.dropdown-menu
if reposContext.org
li
a(href='/' + reposContext.org.name)= reposContext.org.name
if reposContext.availableOrganizations && reposContext.availableOrganizations.length > 0
if reposContext.org
li.divider(role='separator')
li.dropdown-header My organizations
each availableOrg in reposContext.availableOrganizations
- var directPivot = reposContext.pivotDirectlyToOtherOrg ? reposContext.pivotDirectlyToOtherOrg : ''
li
a(href='/' + availableOrg.name + directPivot)= availableOrg.name
if reposContext.section !== 'orgs'
li.divider(role='separator')
li
a(href='/') Join another organization
else if reposContext.org === undefined
li
a(href='/') Join your first org
//- commenting out work-in-progress to get up to production
if reposContext.org
li(class={ active: reposContext.section === 'org' })
a(href=(reposContext.org ? '/' + reposContext.org.name : ''))= reposContext.org.name
li(class={ active: reposContext.section === 'repos' })
a(href=(reposContext.org ? '/' + reposContext.org.name : '') + '/repos') Repos
li(class={ active: reposContext.section === 'teams' })
a(href=(reposContext.org ? '/' + reposContext.org.name : '') + '/teams') Teams
li(class={ active: reposContext.section === 'people' })
a(href=(reposContext.org ? '/' + reposContext.org.name : '') + '/people') People
//-ul.nav.navbar-nav.navbar-right

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

@ -0,0 +1,50 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends layout
block content
h1 Account authorizations
if authorizations.length === 0
p There are no services or accounts currently authorized and stored with your open source account.
each authorization in authorizations
h2= authorization.title
if authorization.text
p.lead= authorization.text
if authorization.valid
- var valid = authorization.valid
- var alert = valid.valid === true ? 'success' : valid.critical === true ? 'danger' : 'warning'
div.alert(class='alert-' + alert)
if valid.valid
h2 Valid Token
else
h2 Validation Failed
if valid.message && valid.valid
p= valid.message
else if valid.message
p
strong= valid.message
if valid.rateLimitRemaining
p
small= valid.rateLimitRemaining
each mitigation in authorization.mitigations
h5= mitigation.title
if mitigation.text
p= mitigation.text
if mitigation.url
p
a.btn.btn-default.btn-sm(href=mitigation.url)= mitigation.mitigation
hr
h4 Validate tokens
p If requested by support, you can use this function to validate the current tokens stored for your account.
a.btn.btn-default.btn-sm(href='/settings/authorizations/validate') Validate authorizations

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

@ -0,0 +1,27 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ./layout.pug
block content
.container
.nav
ul.pager.zero-pad-bottom
li.previous
a(href='javascript:window.history.back()')
span(aria-hidden=true) &larr;
= ' Back to reports'
h2= reportTitle
style(type='text/css')
| div.report li > div { display:inline }
p This report is generated every few hours using operation GitHub data. It is not a list of real-time issues and may contain cached information. The long-form weekly summary digest is prepared regularly but only sent once a week.
div(style='border:2px solid #333; padding: 18px;margin-top:28px')
.report
include ../../jobs/reports/views/administrator

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

@ -0,0 +1,21 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ./layout.pug
block content
div.container
h1 Open source administrator report
if availableReports && availableReports.length
p.lead Please select a report:
each report in availableReports
h4: a(href='/settings/digestReports/administrator/' + report.id)= report.description
else
p No reports are currently available to you, that's great!

15
views/settings/index.pug Normal file
Просмотреть файл

@ -0,0 +1,15 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ./layout.pug
block content
div.container
h1 Profile
p You can edit your profile directly on GitHub.com.
p: a.btn.btn-sm.btn-primary(href='https://github.com/settings/profile', target='_new') Edit GitHub profile

27
views/settings/layout.pug Normal file
Просмотреть файл

@ -0,0 +1,27 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../layout.pug
block content
.container
.row
.col-md-3.col-lg-3
.panel.panel-default
.panel-heading Personal settings
.list-group
a.list-group-item(href='/settings', class={active: view === 'settings'}) Profile
.panel.panel-default
.panel-heading Authorizations & accounts
.list-group
a.list-group-item(href='/settings/authorizations', class={active: view === 'settings/authorizations'}) GitHub
a.list-group-item(href='/settings/npm', class={active: view === 'settings/npm'}) NPM
.panel.panel-default
.panel-heading Reports
.list-group
a.list-group-item(href='/settings/digestReports', class={active: view === 'settings/digestReports'}) Administrator reports
.col-md-7.col-lg-7
block content

28
views/settings/npm.pug Normal file
Просмотреть файл

@ -0,0 +1,28 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends layout.pug
block content
h1 NPM
if !npm
h3 Please validate your NPMJS account
p Your NPM token can be found in your #[code ~/.npmrc] file in your development environment, or you can run #[code npm login] to login locally and then examine that file.
form(method='post')
.form-group
label(for='npmToken') NPM token
input.form-control#npmToken(type='text', name='token', placeholder='NPM token')
button.btn.btn-default Validate
hr
p: small IMPORTANT: Your token will not be stored. It will, however, be used to validate your NPM username with the NPMJS registery to integate with NPM publishing features.
p: small You can manage and revoke your NPMJS tokens at #[a(href='https://www.npmjs.com/settings/tokens', target='_new') https://www.npmjs.com/settings/tokens].
else
p Your NPM username is #[strong #{npm}].
ul.list-inline
li: a.btn.btn-muted(href='https://npmjs.org/~' + npm, target='_new') NPM profile for #{npm}
li
form(method='post', action='/settings/npm/clear')
button.btn.btn-default Remove npm account

155
views/teams/index.pug Normal file
Просмотреть файл

@ -0,0 +1,155 @@
//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends ../layout
block append js_doc_ready
include ../js/search.js
block content
- var languageColor = viewServices.languageColor
- var octicon = viewServices.octicon
.container
if organization
h3= organization.name + ' Teams'
else
h1 GitHub Teams
p.lead Across all officially managed Microsoft organizations
.row
.col-md-8
form.form-horizontal#entitySearch(style='margin-top:24px')
.form-group
.col-md-5
div.input-group
input.form-control#inputQuery(
placeholder='Search repositories...',
type='text',
value=query && query.phrase ? query.phrase : null,
style='max-width:400px')
span.input-group-btn
button(
class='btn btn-muted'
type='submit'
style='border-width: 1px') Search
.col-md-7
ul.nav.nav-pills
li(class=(query.set === 'all' ? 'active' : ''), title='All teams')
a(href='?set=all')
| All teams
li(class=(query.set === 'your' ? 'active' : ''), title='Teams you are a member or maintainer of')
a(href='?set=your')
| Your teams
li(class=(query.set === 'available' ? 'active' : ''), title='Teams that are available and you are not a member of')
a(href='?set=available')
| Available teams
if filters.length
p(style='margin-top:24px')
if search.totalTeams > 1
strong= search.totalTeams.toLocaleString()
| results
else if search.totalTeams === 1
strong 1
| result
else
| No results
= ' for '
each filter in filters
= filter.displayPrefix ? filter.displayPrefix + ' ' : ''
strong= filter.displayValue || filter.value
= ' '
= filter.displaySuffix ? filter.displaySuffix + ' ' : ''
a.pull-right.btn.btn-sm.btn-muted-more(href='?')
!= octicon('x', 14)
= ' Clear filter'
hr
if search.totalTeams === 0
.well.well-lg
div.text-center
p
!= octicon('organization', 24)
if organization
if query.set === 'your'
p.lead None of your teams match.
p
a.btn.btn-primary.btn-sm(href='?set=available') View available teams
else
p.lead This organization doesn't have any teams that match.
else
p.lead No teams match across all organizations.
else
nav(style='margin-bottom:48px')
ul.pager
li.previous(class=(search.page > 1 ? '' : 'disabled'))
a(href='?page_number=' + (search.page-1) + (query.set ? '&set=' + query.set : '') + (query.phrase ? '&q=' + query.phrase : ''))
span(aria-hidden="true") &larr; Previous
li
| #{search.pageFirstTeam.toLocaleString()} - #{search.pageLastTeam.toLocaleString()} of #{search.totalTeams.toLocaleString()}
li.next(class=(search.page < search.totalPages ? '' : 'disabled'))
a(href='?page_number=' + (search.page+1) + (query.set ? '&set=' + query.set : '') + (query.phrase ? '&q=' + query.phrase : ''))
span(aria-hidden="true") Next &rarr;
.container
each team in search.teams
.row.vertical-pad-bottom
// team: name, id, slug, description, organization.login
//- TODO: consider fixing this to be consistent in cross-org vs single org
- var orgName = team.organization.login ? team.organization.login : team.organization.name
- var isMultipleOrganizationView = !organization && team.organization
- var teamLink = '/' + orgName + '/teams/' + team.slug
.col-md-6
.team(id=team.slug)
h3: a(href=teamLink)= team.name
if team.description
p=team.description
.col-md-4(style={
'margin-top': isMultipleOrganizationView ? null : '30px'
})
if isMultipleOrganizationView
h4(style='margin-top:12px')= orgName
//- Actions
- var userStatus = yourTeamsMap.get(team.id)
if userStatus === 'maintainer'
p: a.btn.btn-sm.btn-default(href=teamLink, title='As a Team Maintainer, you can manage this team') Manage team
else if userStatus === 'member'
p: a.btn.btn-sm.btn-muted-more(href=teamLink, title='You are a member of this team') You're a team member
else
p: a.btn.btn-sm.btn-muted(href=teamLink, title='Learn more about this team') Team information
nav
ul.pager
li.previous(class=(search.page > 1 ? '' : 'disabled'))
a(href='?page_number=' + (search.page-1) + (query.set ? '&set=' + query.set : '') + (query.phrase ? '&q=' + query.phrase : ''))
span(aria-hidden="true") &larr; Previous
li
h4(style="display:inline")
| Page #{search.page} of #{search.totalPages}
li.next(class=(search.page < search.totalPages ? '' : 'disabled'))
a(href='?page_number=' + (search.page+1) + (query.set ? '&set=' + query.set : '') + (query.phrase ? '&q=' + query.phrase : ''))
span(aria-hidden="true") Next &rarr;
.col-md-3.col-md-offset-1
div(style='margin-left:12px')
if orgs
h4 Need to create a team?
p Any organization member can create a new team directly on the GitHub.com site.
hr
h4 Organizations
ul.list-unstyled
each org in orgs
li(style='margin-bottom:8px')
a.btn.btn-muted-more.btn-sm(
href='/' + org.name + '/teams'
)= org.name

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

@ -9,10 +9,11 @@ block content
div.container
div.row(style='margin-top:48px')
div.col-md-5.col-lg-5.col-sm-5
h1.huge Great OSS.
h1.huge Epic Open Source.
p.lead.
This application is powered by the work of a great number or developers,
engineers, services & experts. Thanks!
This application is powered by the work of a great number or developers,
engineers, services & experts.
p.lead Thanks!
div.col-md-7.col-lg-7.col-sm-7
if components
h2 Powered by
@ -20,6 +21,8 @@ block content
a(href='https://nodejs.org/', target='_new') Node.js
h4
a(href='https://azure.microsoft.com/en-us/services/app-service/', target='_new') Azure App Service
h4
a(href='https://azure.microsoft.com/en-us/services/key-vault/', target='_new') Azure Key Vault
h4
a(href='https://azure.microsoft.com/en-us/services/storage/', target='_new') Azure Storage Service
h4
@ -28,9 +31,13 @@ block content
a(href='https://developer.github.com/v3/', target='_new') GitHub API
h2 Node.js Modules
h5 ...and their dependencies
each details, component in components
h4
a(href=details.homepage, target='_new')= component
if details.homepage
a(href=details.homepage, target='_new')= component
else
span= component
if details.description
small= ' ' + details.description
h2 Front-end Components

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

@ -11,29 +11,31 @@ block content
div.container
h1 Unlink #{user.github.username}?
h1 Unlink #{user.azure.username} and #{user.github.username} (GitHub)?
p.lead Sorry to see you go.
if orgs && orgs.length && orgs.length > 0
p You are currently a member of the following #{config.companyName} organization#{orgs.length == 1 ? '' : 's'} on GitHub:
- var unlinkText = 'Unlink anyway'
p Before you leave, you're currently a member of the following #{config.brand.companyName} organization#{orgs.length == 1 ? '' : 's'} on GitHub:
ul
each org in orgs
li= org.name
p Please carefully review this page. Removing your corporate association will remove you from all of the organizations listed above.
p.
<strong>Potential data loss warning:</strong> If you use private repos with your
project, and have changes in a private fork that have not yet been committed to the
upstream repo for the org, they will be lost when membership is removed.
p Unlinking your accounts will remove you from all of the organizations listed above and <strong>may result in data loss</strong>.
p Please be very careful and review the following before deciding whether to "unlink" your GitHub account:
ul
li Your GitHub account, #{user.github.username}, will lose privileged access to these orgs.
li Private forks of repos from these orgs, if any, will be removed by GitHub.
li Work committed in a private fork of these org's repos will be lost.
ul
li Your GitHub account #{user.github.username} will lose access to #{config.companyName} organizations
li Private forks of repos from these orgs, if any, will be removed by GitHub
li Work committed in a private fork of a #{config.companyName} org will be lost
else
- var unlinkText = 'Unlink'
p Seems you are not in an #{config.brand.companyName} orgs so nothing should change in your GitHub experience.
form(method='post', action='/unlink')
p &nbsp;
form(method='post')
p
input.btn.btn-lg.btn-danger(type='submit', value='Remove my corporate link')
input.btn.btn-lg.btn-danger(type='submit', value=unlinkText)
| &nbsp; &nbsp; &nbsp;
a.btn.btn-lg.btn-default(href='/') Cancel

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

@ -6,48 +6,52 @@
extends layout
block content
- var primary = config.authentication.scheme === 'github'? 'GitHub' : config.brand.companyName
- var secondary = config.authentication.scheme === 'github'? config.brand.companyName : 'GitHub'
div.container
div.row
div.col-md-6.col-lg-6.col-sm-6
if config.authentication.scheme === 'github'
div.col-md-12.col-lg-12.col-sm-12
if config.authentication.scheme === 'github' && user && user.github
h1 Hi, #{user.github.displayName || user.github.username}
h2 #{config.companyName} employees &amp; vendors
else if config.authentication.scheme === 'aad'
else if config.authentication.scheme === 'aad' && user && user.azure
h1 Hi, #{user.azure.displayName || user.azure.username}
if config.authentication.scheme === 'github'
p.lead To onboard, please authenticate with Active Directory.
p
a.btn.btn-lg.btn-primary(href='/signin/azure') Sign in to #{config.companyName}
a.btn.btn-lg.btn-primary(href='/signin/azure') Sign in to #{config.brand.companyName}
else if config.authentication.scheme === 'aad'
p.lead Please authenticate with the GitHub account that you want to use for your #{config.companyName} work.
p.lead Linking your #{config.brand.companyName} and GitHub accounts gives you access to the #{config.brand.companyName} orgs, teams, and repos on GitHub. We already know your #{primary} id, so just sign in to the #{secondary} account you want to link and we'll set that up.
div.row
div.col-md-6.col-lg-6.col-sm-6
div
a.btn.btn-primary.btn-huge.full-width(href='/signin/github')
h3 I already have a GitHub username
p Sign In
div
a.btn.btn-default.full-width(href='/signin/github/join')
h3 I'm new to GitHub
p Let's create a brand new GitHub username
h3 I already have a GitHub account
p Sign in
div.col-md-6.col-lg-6.col-sm-6
div
a.btn.btn-default.btn-huge.full-width(href='/signin/github/join')
h3 I'm new to GitHub
p Create a GitHub account
div.row
div.col-md-12.col-lg-12.col-sm-12
div(style='padding:12px')
p.lead Joining should take 2-15 minutes
p Onboarding goes pretty quickly, depending on whether you already have a GitHub account and GitHub multi-factor authentication setup.
p.lead Linking should take 2-10 minutes
p The process has just a few steps depending on whether or not you already have a GitHub account and multi-factor authentication setup.
ul
if config.authentication.scheme === 'github'
li Validate the corporate account to link with #{user.github.username}
li Validate the corporate account to link with #{user.github.username}.
if config.authentication.scheme === 'aad'
li Validate the GitHub account to link with #{user.azure.username}
li Join a #{config.companyName} GitHub organization
li Verify and/or configure the two-factor security of your GitHub account
li Allow you to request access to GitHub teams
li Validate the GitHub account to link with #{user.azure.username}.
li Verify and/or configure multi-factor authentication for your GitHub account.
li [Optional] Join #{config.brand.companyName} GitHub organizations.
li [Optional] Request access to GitHub teams.
if config.authentication.scheme === 'aad'
hr
p.lead One or two GitHub usernames?
p.lead Multiple GitHub accounts?
p.
Since Git repositories can be locally configured to mark commits
with a name and e-mail address, it's easy to use a single GitHub
account for both corporate and other GitHub projects you may
work with.
p
a(href='about:blank', target='_new') Click here for more information
account for both #{config.brand.companyName} and other GitHub projects you work on. We recommend
you use one GitHub account as this personalizes your contributions and builds a stronger
sense of community.