2019-10-04 01:02:03 +03:00
//-
2020-04-15 01:57:21 +03:00
//- Copyright (c) Microsoft.
2019-10-04 01:02:03 +03:00
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-
extends email
block content
2020-04-15 01:57:21 +03:00
- var isFork = lockdownMailContent.repository.fork
- var isNewRepo = action == 'created';
- var isTransfer = action == 'transferred';
- var targetType = isFork ? 'Fork' : 'Repo'
2019-10-04 01:02:03 +03:00
if isMailToCreator
2020-04-15 01:57:21 +03:00
if isForkAdministratorLocked
p.
Hi,#[br]
You just forked a GitHub repo, #{lockdownMailContent.repository.name}, into the official #{lockdownMailContent.organization.name} GitHub org. To contribute to an upstream project, typically you should fork the repo directly into your individual GitHub account.
2021-07-18 00:33:35 +03:00
if forkUnlockMail
h3 Please contact #{forkUnlockMail} with more information
p: strong Action required: you must e-mail #[a(href='mailto:' + forkUnlockMail)= forkUnlockMail] and provide more information to unlock this fork
p Please provide the following information to help make sure this is a social/community-friendly fork and gain approval:
2020-04-15 01:57:21 +03:00
ul
li Why an official fork is being created
li Information including prior communications with the upstream open source community where the idea of forking was socialized
li Information about how you will support this fork long-term, including responding to contributions through pull requests and issues
li Whether there are plans to eventually contribute the forked changes upstream and delete this fork
li Acknowledgement that you will help govern this fork and work with any others in this GitHub org who would also like to maintain this fork
li Other useful information including your business goals relating to this project
2023-02-24 06:39:37 +03:00
else if isForkDeleted
h3 Your fork was deleted.
p If you need to fork this repo again, please create the fork within your individual GitHub account #[strong=username].
p If you believe there is a business need for an official fork, please contact #[a(href='mailto:' + forkUnlockMail)= forkUnlockMail] to discuss your use case.
2020-04-15 01:57:21 +03:00
else
p.
Hi,#[br]
You just #{action} a GitHub repository, #{lockdownMailContent.repository.name}. Complete the setup wizard to configure the repo permissions and release information.
2019-10-04 01:02:03 +03:00
2020-04-15 01:57:21 +03:00
if isTransfer && transferSourceRepositoryLogin
h3 Incoming transfer from #{transferSourceRepositoryLogin}
if lockdownMailContent.repository && lockdownMailContent.repository.fork
h3 Fork
p This repository was forked. A fork into an official organization can be confusing with an active upstream open source community. Please verify that the individual creating this repo intends for their business to maintain this new forked open source community. If this is just a fork to contribute, engineers should contribute from their own individual account fork.
2023-02-24 06:39:37 +03:00
if !isForkAdministratorLocked && !isForkDeleted
2020-04-15 01:57:21 +03:00
h3 Gain access to your new repository
p
a(href=lockdownMailContent.linkToClassifyRepository, target='_new', style='font-size: 36px') Finish setting up #{lockdownMailContent.repository.name}
br
small
| Direct link to complete setup:
a(href=lockdownMailContent.linkToClassifyRepository, target='_new', style='font-size: 10px')= lockdownMailContent.linkToClassifyRepository
2023-02-24 06:39:37 +03:00
if lockdownMailContent.linkToDeleteRepository && !isForkDeleted
2020-04-15 01:57:21 +03:00
h3 Delete the #{targetType.toLowerCase()}
p If you no longer need this repo, or this was an accident, click below to delete the repo. The page will ask for your confirmation first.
p
a(href=lockdownMailContent.linkToDeleteRepository, target='_new') Delete #{targetType.toLowerCase()} #{lockdownMailContent.repository.name}
br
small
| Link to delete:
a(href=lockdownMailContent.linkToDeleteRepository, target='_new', style='font-size: 10px')= lockdownMailContent.linkToDeleteRepository
2019-10-04 01:02:03 +03:00
2023-02-24 06:39:37 +03:00
if !isForkDeleted
h4 Repository
p
a(href='https://github.com/' + lockdownMailContent.organization.name + '/' + lockdownMailContent.repository.name)= 'https://github.com/' + lockdownMailContent.organization.name + '/' + lockdownMailContent.repository.name
if lockdownMailContent.repository.private && isForkAdministratorLocked
br
| WARNING: This is a private repository and you will not be able to access it until you complete the setup process.
2019-10-04 01:02:03 +03:00
h4 GitHub user
if lockdownMailContent.link
table
tbody
tr
td GitHub account
td= lockdownMailContent.link.thirdPartyUsername
tr
td Corporate identity
td= lockdownMailContent.link.corporateUsername
2023-02-24 06:39:37 +03:00
if isForkAdministratorLocked &&!isForkDeleted
2021-07-18 00:33:35 +03:00
h4 For operations use only
p When ready to manage this request, please approve at: #[a(href=linkToAdministrativeUnlockRepository)= linkToAdministrativeUnlockRepository].
2020-04-15 01:57:21 +03:00
2019-10-04 01:02:03 +03:00
else if isMailToOperations
2023-02-24 06:39:37 +03:00
if isForkDeleted
p A repository was #[strong immediately deleted] after being forked directly into an official org.
else if isForkAdministratorLocked
2020-04-15 01:57:21 +03:00
p A repository was forked directly into an official org. It has been locked pending your administrative decision.
else
p A repository was created directly on GitHub.com. The repository has been locked down pending the user's completion of the new repository wizard.
2019-10-04 01:02:03 +03:00
if mailSentToCreator
p A mail was sent to the person who created the repo to continue the process.
else
h2: strong WARNING no mail was sent to the creator.
h3 Created by #{lockdownMailContent.username}
p: a(href='https://github.com/' + lockdownMailContent.username)= 'https://github.com/' + lockdownMailContent.username
if lockdownMailContent.link
table
tbody
tr
td GitHub account
td= lockdownMailContent.link.thirdPartyUsername
tr
td Corporate identity
td= lockdownMailContent.link.corporateUsername
if lockdownMailContent.mailAddress
2023-02-24 06:45:21 +03:00
p.
2020-04-15 01:57:21 +03:00
| Mail address of the user that created the repo:
2019-10-04 01:02:03 +03:00
a(href='mailto:' + lockdownMailContent.mailAddress)= lockdownMailContent.mailAddress
else
p: strong An e-mail was NOT sent. No e-mail address was available for the username.
2020-04-15 01:57:21 +03:00
h4 Repository
p
a(href='https://github.com/' + lockdownMailContent.organization.name + '/' + lockdownMailContent.repository.name)= 'https://github.com/' + lockdownMailContent.organization.name + '/' + lockdownMailContent.repository.name
if lockdownMailContent.repository.private
br
| WARNING: This is a private repository
if lockdownMailContent.repository && lockdownMailContent.repository.fork
h3 FORK
2022-10-07 08:31:29 +03:00
p This repository was forked. A fork into an official {config.brand.companyName} organization is a very big deal and can cause confusion with the upstream open source community. Please verify that the individual creating this repo intends for their business to maintain this new forked open source community. If this is just a fork to contribute, engineers should contribute from their own individual account fork.
2020-04-15 01:57:21 +03:00
2023-02-24 06:39:37 +03:00
if isForkAdministratorLocked && !isForkDeleted
2020-04-15 01:57:21 +03:00
h4 For operations use
p When ready to manage this request, please use the following URL: #[a(href=lockdownMailContent.repository.absoluteBaseUrl + 'administrativeLock')= lockdownMailContent.repository.absoluteBaseUrl + 'administrativeLock'].
2023-02-24 06:39:37 +03:00
if isForkDeleted
h4 For operations use
p An official organization owner can still fork into the organization, or, you can use a pre-approval method to allow a specific account to fork at their leisure and go through the typical setup process.
2019-10-04 01:02:03 +03:00
if lockdownMailContent.log
h3 Operations log
p The following lockdown operations log represents changes made from when the repo was created.
ul
each det in lockdownMailContent.log
li= det