-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes in Compliance controls structure
- Loading branch information
Johanna Ahlskog
committed
Sep 14, 2023
1 parent
25c0c3b
commit a835a58
Showing
15 changed files
with
84 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"ignorePatterns": ["node_modules", "test"], | ||
"rules": { | ||
"@typescript-eslint/explicit-function-return-type": "warn", | ||
"@typescript-eslint/typedef": [ | ||
"error", | ||
{ | ||
"arrayDestructuring": true, | ||
"arrowCallSignature": true, | ||
"arrowParameter": true, | ||
"callSignature": true, | ||
"memberVariableDeclaration": true, | ||
"parameter": true, | ||
"propertyDeclaration": true, | ||
"objectDestructuring": true, | ||
"variableDeclaration": true, | ||
"variableDeclarationIgnoreFunction": true | ||
} | ||
], | ||
"@typescript-eslint/no-inferrable-types": 0, | ||
"@typescript-eslint/naming-convention": ["error", { "selector": "variableLike", "format": ["camelCase"] }] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,23 @@ | ||
name: Build | ||
run-name: ${{ github.actor }} is testing out github actions | ||
# permissions: | ||
# actions: read | ||
# checks: read | ||
# contents: read | ||
# deployments: read | ||
# id-token: write | ||
# issues: read | ||
# discussions: read | ||
# packages: read | ||
# pages: read | ||
# pull-requests: read | ||
# repository-projects: read | ||
# security-events: read | ||
# statuses: read | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run a one-line script | ||
run: echo Hello, world! | ||
- name: Run a multi-line script | ||
run: | | ||
echo Add other actions to build, | ||
echo test, and deploy your projectss | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
- name: Install | ||
run: npm ci | ||
- name: Build | ||
run: npm run package | ||
# - name: 'Az CLI login' | ||
# uses: azure/login@v1 | ||
# with: | ||
# client-id: ${{ secrets.AZURE_CLIENT_ID }} | ||
# tenant-id: ${{ secrets.AZURE_TENANT_ID }} | ||
# subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
# - name: 'Run Azure CLI commands' | ||
# run: az account show | ||
- name: 'Custom Task running' | ||
run: npm run build | ||
- name: 'Run Compliance State' | ||
uses: ./ | ||
with: | ||
repo-token: ${{ secrets.MY_GITHUB_PAT}} | ||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,3 +101,5 @@ __tests__/runner/* | |
.idea | ||
.vscode | ||
*.code-workspace | ||
|
||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
dist/ | ||
node_modules/ | ||
coverage/ | ||
coverage/ | ||
README.md |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# How to install linting and format | ||
|
||
1. Run the following commands (be in the root, if you don't have a package.json there, run npm init first to create one): | ||
|
||
```yaml | ||
npm install eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin husky prettier --save-dev | ||
npm pkg set scripts.prepare="husky install" | ||
npm run prepare | ||
``` | ||
|
||
2. Copy files: .eslintrc.json, .prettierignore, .prettierrc and .husky/pre-commit | ||
|
||
3. Add following to script section in package.json: | ||
|
||
```json | ||
"lint": "eslint . --ext .ts", | ||
"lint:fix": "eslint . --fix --ext .ts", | ||
"format:write": "npx prettier -w .", | ||
"format:check": "npx prettier -c .", | ||
``` | ||
|
||
4. Make a commit. You should see that your files are being checked for rule breaks. If it does not work and you are using a Mac, run following command and try a new commit: | ||
|
||
```yaml | ||
chmod ug+x .husky/* | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# CyDig Pipeline Tasks | ||
# CyDig Compliance Action | ||
|
||
This repository contains compliance tasks. | ||
This repository contains a action with compliance controls. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters