Skip to content

Commit 9207c56

Browse files
authored
Merge branch 'KelvinTegelaar:main' into main
2 parents 3ab597f + f7e7936 commit 9207c56

File tree

73 files changed

+1591
-293
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1591
-293
lines changed

.github/workflows/pr_check.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: PR Branch Check
2+
3+
on:
4+
# Using pull_request_target instead of pull_request for secure handling of fork PRs
5+
pull_request_target:
6+
# Only run on these PR events
7+
types: [opened, synchronize, reopened]
8+
# Only check PRs targeting these branches
9+
branches:
10+
- main
11+
- master
12+
13+
permissions:
14+
pull-requests: write
15+
issues: write
16+
17+
jobs:
18+
check-branch:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check and Comment on PR
22+
# Only process fork PRs with specific branch conditions
23+
# Must be a fork AND (source is main/master OR target is main/master)
24+
if: |
25+
github.event.pull_request.head.repo.fork == true &&
26+
((github.event.pull_request.head.ref == 'main' || github.event.pull_request.head.ref == 'master') ||
27+
(github.event.pull_request.base.ref == 'main' || github.event.pull_request.base.ref == 'master'))
28+
uses: actions/github-script@v7
29+
with:
30+
github-token: ${{ secrets.GITHUB_TOKEN }}
31+
script: |
32+
let message = '';
33+
34+
message += '🔄 If you are attempting to update your CIPP repo please follow the instructions at: https://docs.cipp.app/setup/self-hosting-guide/updating. Are you a sponsor? Contact the helpdesk for direct assistance with updating to the latest version.';
35+
message += '\n\n';
36+
37+
// Check if PR is targeting main/master
38+
if (context.payload.pull_request.base.ref === 'main' || context.payload.pull_request.base.ref === 'master') {
39+
message += '⚠️ PRs cannot target the main branch directly. If you are attempting to contribute code please PR to the dev branch.\n\n';
40+
}
41+
42+
// Check if PR is from a fork's main/master branch
43+
if (context.payload.pull_request.head.repo.fork &&
44+
(context.payload.pull_request.head.ref === 'main' || context.payload.pull_request.head.ref === 'master')) {
45+
message += '⚠️ This PR cannot be merged because it originates from your fork\'s main/master branch. If you are attempting to contribute code please PR from your dev branch or another non-main/master branch.\n\n';
46+
}
47+
48+
message += '🔒 This PR will now be automatically closed due to the above rules.';
49+
50+
// Post the comment
51+
await github.rest.issues.createComment({
52+
...context.repo,
53+
issue_number: context.issue.number,
54+
body: message
55+
});
56+
57+
// Close the PR
58+
await github.rest.pulls.update({
59+
...context.repo,
60+
pull_number: context.issue.number,
61+
state: 'closed'
62+
});

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
#Replace with CIPPREadMe
1+
![CyberDrain Light](github_assets/img/CIPP.png#gh-dark-mode-only)
2+
![CyberDrain Dark](github_assets/img/CIPP-Light.png#gh-light-mode-only)
3+
4+
# What is this?
5+
6+
The CyberDrain Improved Partner Portal is a portal to help manage administration for Microsoft Partners. The current Microsoft partner landscape makes it fairly hard to manage multi tenant situations, with loads of manual work. Microsoft Lighthouse might resolve this in the future but development of this is lagging far behind development of the current market for Microsoft Partners.
7+
This project is a way to help you with administration, with user management, and deploying your own preferred standards. It's not a replacement for security tools, or a way to cut costs on specific subscriptions. The tool should assist you in removing the gripes with standard partner management and save you several hours per engineer per month.
8+
For more information, we recommend checking out our website [here](https://cipp.app)
9+
For detailed documentation about features of CIPP, please check out our [documentation.](https://docs.cipp.app)
10+
11+
# Our sponsors
12+
13+
You can find our sponsors [here.](https://docs.cipp.app/#our-sponsors)
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
Get-Command kitty -ErrorAction Stop | Out-Null
2-
Write-Host 'Starting CIPP Dev Emulators'
32
Get-Process node -ErrorAction SilentlyContinue | Stop-Process -ErrorAction SilentlyContinue
43
$Path = (Get-Item $PSScriptRoot).Parent.Parent.FullName
54

5+
pwsh -file (Join-Path $PSScriptRoot 'Start-CippDevInstallation.ps1')
6+
7+
Write-Host 'Starting CIPP Dev Emulators'
8+
69
if (Test-Path (Join-Path $Path 'CIPP-API-Processor')) {
710
$Process = Read-Host -Prompt 'Start Process Function (y/N)?'
811
}
@@ -11,14 +14,14 @@ if ($Process -eq 'y') {
1114
kitty --detach --title 'CIPP' -o allow_remote_control=yes -- pwsh -c "
1215
kitty @new-window --new-tab --tab-title `"Azurite`" --cwd $Path -- azurite ;
1316
kitty @new-window --new-tab --tab-title `"FunctionApp`" --cwd (Join-Path $Path `"CIPP-API`") -- func start;
14-
kitty @new-window --new-tab --tab-title `"CIPP Frontend`" --cwd (Join-Path $Path `"CIPP`") -- npm run dev ;
17+
kitty @new-window --new-tab --tab-title `"CIPP Frontend`" --cwd (Join-Path $Path `"CIPP`") -- yarn run dev ;
1518
kitty @new-window --new-tab --tab-title `"SWA`" --cwd (Join-Path $Path `"CIPP`") -- npm run start-swa;
1619
kitty @new-window --new-tab --tab-title `"CIPP-API-Processor`" --cwd (Join-Path $Path `"CIPP-API-Processor`") -- func start --port 7072"
1720

1821
} else {
1922
kitty --detach --title 'CIPP' -o allow_remote_control=yes -- pwsh -c "
2023
kitty @new-window --new-tab --tab-title `"Azurite`" --cwd $Path -- azurite ;
2124
kitty @new-window --new-tab --tab-title `"FunctionApp`" --cwd (Join-Path $Path `"CIPP-API`") -- func start;
22-
kitty @new-window --new-tab --tab-title `"CIPP Frontend`" --cwd (Join-Path $Path `"CIPP`") -- npm run dev ;
25+
kitty @new-window --new-tab --tab-title `"CIPP Frontend`" --cwd (Join-Path $Path `"CIPP`") -- yarn run dev ;
2326
kitty @new-window --new-tab --tab-title `"SWA`" --cwd (Join-Path $Path `"CIPP`") -- npm run start-swa"
2427
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
$Path = (Get-Item $PSScriptRoot).Parent.Parent.FullName
2+
3+
if (-not(Get-Command npm)) {
4+
throw 'npm is required to install the CIPP development environment'
5+
}
6+
7+
if (-not(Get-Command azurite)) {
8+
Write-Host 'Installing Azurite'
9+
npm install --global 'azurite'
10+
}
11+
12+
if (-not(Get-Command swa)) {
13+
Write-Host 'Installing @azure/static-web-apps-cli'
14+
npm install --global '@azure/static-web-apps-cli'
15+
}
16+
17+
if (-not(Get-Command func)) {
18+
Write-Host 'Installing Azure Functions Core Tools'
19+
npm install --global 'azure-functions-core-tools@4' --unsafe-perms true
20+
}
21+
22+
if (-not(Get-Command yarn)) {
23+
Write-Host 'Installing Yarn'
24+
npm install --global yarn
25+
}
26+
27+
if (-not(yarn list --global --pattern 'next' | Select-String -Pattern 'next')) {
28+
Write-Host 'Installing Next.js'
29+
yarn install --global next --network-timeout 500000
30+
}
31+
32+
yarn install --cwd (Join-Path $Path "CIPP") --network-timeout 500000

deployment/DevAzureDeploymentTemplate_regionoptions.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@
294294
"buildProperties": {
295295
"appLocation": "/",
296296
"apiLocation": "",
297+
298+
"appArtifactLocation": ""
297299
"outputLocation": "/out"
298300
}
299301
},

github_assets/img/CIPP-Light.png

25.6 KB
Loading

github_assets/img/CIPP.png

15.9 KB
Loading

github_assets/img/CyberDrain.png

97.5 KB
Loading
53.9 KB
Loading
53.9 KB
Loading

0 commit comments

Comments
 (0)