Skip to content

Adding support for GHAS + Minor improvements #311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8e70bb4
Update local.settings.json
josunefon May 5, 2023
34b43ee
Update deploy.bicep
josunefon May 5, 2023
8810515
Update gh-contributions.yml
josunefon May 8, 2023
6a0fe7d
Update gh-contributions.yml
josunefon May 8, 2023
1b767a3
Update gh-contributions.yml
josunefon May 8, 2023
de4c8d5
Update gh-contributions.yml
joselcaguilar May 8, 2023
fc1ff7b
Update gh-contributions.yml
joselcaguilar May 8, 2023
fddb5a2
Update gh-contributions.yml
joselcaguilar May 8, 2023
bde0173
Update gh-contributions.yml
joselcaguilar May 8, 2023
2a756b4
Update gh-contributions.yml
joselcaguilar May 8, 2023
c9a21bc
get secrets added
josunefon May 8, 2023
860427d
Merge branch 'main' of https://github.com/josunefoOrg/CCOInsights-Glo…
josunefon May 8, 2023
6684460
Update gh-contributions.yml
joselcaguilar May 8, 2023
4ff535e
Merge branch 'main' of https://github.com/josunefoOrg/CCOInsights-Glo…
josunefon May 8, 2023
f6ea13e
Merge pull request #1 from josunefoOrg/dev
josunefon May 8, 2023
1945f94
New security functions
joselcaguilar May 8, 2023
7866175
Adding dependabot alerts
joselcaguilar May 8, 2023
006234a
Minor fixes
joselcaguilar May 9, 2023
c9d77db
Adding created_at and updated_at to secrets endpoint call
joselcaguilar May 9, 2023
b025e2d
Minor fixes to dependabot
joselcaguilar May 9, 2023
9a2cd10
Debugging
joselcaguilar May 9, 2023
5d8d749
RowKeys fixed
joselcaguilar May 9, 2023
a96282c
Minor fix for code scanning alert rowkey
joselcaguilar May 9, 2023
925f14e
Adding per_page query param to GHAS queries
joselcaguilar May 9, 2023
3f73267
Ready for PR
joselcaguilar May 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions .github/workflows/gh-contributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
required: true
default: ""

permissions:
id-token: write
contents: read

jobs:
deploy_dashboard:
runs-on: windows-2022
Expand All @@ -18,10 +22,12 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Azure Login
uses: Azure/login@v1
- name: Login via Az module
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
client-id: ${{ secrets.AZURE_AD_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_AD_TENANT_ID }}
subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: "Deploy infrastructure"
id: rg
Expand All @@ -40,16 +46,17 @@ jobs:
}
./tools/scripts/Convert-TokenInFile.ps1 @ConvertTokenListFunctionInput -Verbose
- name: "Deploy code"
shell: pwsh
run: |
# Initialize parameters
Install-Module -Name Az.Functions -Force
$functionApp = Get-AzFunctionApp -ResourceGroupName '${{ github.event.inputs.resourceGroupName }}'
$functionAppName = $functionApp[0].Name
$DeployFunctionInputs = @{
ResourceGroup = '${{ github.event.inputs.resourceGroupName }}'
FunctionAppName = $functionAppName
Dashboard = 'GitHub'
}
# Invoke Function
./tools/scripts/deploy-function.ps1 @DeployFunctionInputs -Verbose
uses: azure/powershell@v1
with:
azPSVersion: "latest"
inlineScript: |
# Initialize parameters
$functionApp = Get-AzFunctionApp -ResourceGroupName '${{ github.event.inputs.resourceGroupName }}'
$functionAppName = $functionApp[0].Name
$DeployFunctionInputs = @{
ResourceGroup = '${{ github.event.inputs.resourceGroupName }}'
FunctionAppName = $functionAppName
Dashboard = 'GitHub'
}
# Invoke Function
./tools/scripts/deploy-function.ps1 @DeployFunctionInputs -Verbose
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@description('Base name to be used in all resources')
param name string = 'cco-github-contributions'
param name string = 'cco-github'

@description('Name of the sotrage account')
param staname string = 'ccoghcontsta'
param staname string = 'ccogithubsta'

@description('Location where resources should be deployed')
param location string = resourceGroup().location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ $pullRequestsNumbers = Get-ClosedPullRequests -DailyRefresh
Get-Stargazers
Get-Traffic
Get-Issues -DailyRefresh
Get-Releases
Get-Releases
Get-Secrets
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ Get-Contributors -users $users
Get-Traffic
Get-Issues
Get-Releases
Get-Secrets
Get-CodeScanningAlerts
Get-CodeScanningAnalysis
Get-DependabotAlerts
Get-SecretScanningAlerts
Loading