-
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.
- Loading branch information
Edward Jimenez
committed
Mar 18, 2022
1 parent
d144093
commit 59ea5b2
Showing
29 changed files
with
31,564 additions
and
27,302 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,3 @@ | ||
{ | ||
"presets": ["@babel/preset-env"] | ||
} |
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,33 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
es6: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:jest/recommended', | ||
'plugin:import/errors', | ||
'plugin:react-hooks/recommended', | ||
'prettier', | ||
], | ||
parserOptions: { | ||
parser: 'babel-eslint', | ||
ecmaVersion: 2021, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
rules: { | ||
'react/function-component-definition': 0, | ||
'react/boolean-prop-naming': 0, | ||
'react/prop-types': 0, | ||
'react-hooks/exhaustive-deps': 1, | ||
'react/react-in-jsx-scope': 0, | ||
'no-unused-vars': 1, | ||
'react/display-name': [0], | ||
}, | ||
}; |
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
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,7 +1,7 @@ | ||
# https://help.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' |
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,154 +1,154 @@ | ||
name: pr | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
GIT_AUTHOR_NAME: github-actions[bot] | ||
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com | ||
GIT_COMMITTER_NAME: GitHub | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
CDK_DEFAULT_ACCOUNT: 111111111111 | ||
CDK_DEFAULT_REGION: us-east-1 | ||
CDK_DEPLOY_STAGES: dev int tp prod | ||
CDK_DEPLOY_dev_ACCOUNTS: 111111111111 | ||
CDK_DEPLOY_int_ACCOUNTS: 111111111111 | ||
CDK_DEPLOY_tp_ACCOUNTS: 333333333333 | ||
CDK_DEPLOY_prod_ACCOUNTS: 333333333333 | ||
CDK_DEPLOY_dev_111111111111_REGIONS: us-east-1 | ||
CDK_DEPLOY_int_111111111111_REGIONS: us-east-1 | ||
CDK_DEPLOY_tp_333333333333_REGIONS: us-east-1 | ||
CDK_DEPLOY_prod_333333333333_REGIONS: us-east-1 | ||
GIT_AUTHOR_NAME: github-actions[bot] | ||
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com | ||
GIT_COMMITTER_NAME: GitHub | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
CDK_DEFAULT_ACCOUNT: 111111111111 | ||
CDK_DEFAULT_REGION: us-east-1 | ||
CDK_DEPLOY_STAGES: dev int tp prod | ||
CDK_DEPLOY_dev_ACCOUNTS: 111111111111 | ||
CDK_DEPLOY_int_ACCOUNTS: 111111111111 | ||
CDK_DEPLOY_tp_ACCOUNTS: 333333333333 | ||
CDK_DEPLOY_prod_ACCOUNTS: 333333333333 | ||
CDK_DEPLOY_dev_111111111111_REGIONS: us-east-1 | ||
CDK_DEPLOY_int_111111111111_REGIONS: us-east-1 | ||
CDK_DEPLOY_tp_333333333333_REGIONS: us-east-1 | ||
CDK_DEPLOY_prod_333333333333_REGIONS: us-east-1 | ||
|
||
jobs: | ||
cdk-diff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup NodeJS | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "12" | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Install CDK | ||
run: npm install -g aws-cdk@1 | ||
|
||
- name: Checkout main | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
fetch-depth: 0 | ||
|
||
- name: Setup Artifactory | ||
uses: blackboard-innersource/gh-action-setup-artifactory@main | ||
env: | ||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | ||
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }} | ||
ARTIFACTORY_PYPI_INDEX: ${{ secrets.ARTIFACTORY_PYPI_INDEX }} | ||
ARTIFACTORY_NPM_REGISTRY: ${{ secrets.ARTIFACTORY_NPM_REGISTRY }} | ||
|
||
- name: Install main dependencies | ||
run: pip install pip-tools && pip-sync | ||
|
||
- name: CDK synth main | ||
run: cdk synth -o base.cdk.out | ||
|
||
- name: Checkout PR branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
fetch-depth: 0 | ||
clean: false | ||
|
||
- name: Merge main to PR branch | ||
run: git merge origin/main | ||
|
||
- name: Install PR branch dependencies | ||
run: pip-sync | ||
|
||
- name: CDK synth PR branch | ||
run: cdk synth -o head.cdk.out | ||
|
||
- name: Comment on Pull Request | ||
uses: actions/github-script@v3 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
var fs = require('fs'); | ||
github.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: fs.readFileSync('${{ steps.diff.outputs.comment_file }}', 'utf8') | ||
}) | ||
# Always run this last as it can push new changes and actions will not rerun. | ||
pre-commit: | ||
needs: [cdk-diff] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Install PreCommit | ||
run: pip install pre-commit | ||
|
||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
|
||
- name: PreCommit | ||
id: pre-commit | ||
run: | | ||
if SKIP=flake8 pre-commit run --show-diff-on-failure --color=always --all-files; then | ||
echo "::set-output name=failed::0" | ||
else | ||
echo "::set-output name=failed::1" | ||
fi | ||
if [ -n "$(git status -s)" ]; then | ||
echo "::set-output name=dirty::1" | ||
else | ||
echo "::set-output name=dirty::0" | ||
fi | ||
# Run a second time to verify that everything has indeed been fixed. | ||
- name: PreCommit verify | ||
if: steps.pre-commit.outputs.failed == 1 | ||
run: | | ||
SKIP=flake8 pre-commit run --show-diff-on-failure --color=always --all-files | ||
- name: Commit and Push to Pull Request | ||
if: steps.pre-commit.outputs.failed == 1 && steps.pre-commit.outputs.dirty == 1 | ||
run: | | ||
git add . | ||
git status | ||
git commit -m "Automated formatting changes" | ||
git push origin ${{ github.head_ref }} | ||
- name: Comment on Pull Request | ||
if: steps.pre-commit.outputs.failed == 1 && steps.pre-commit.outputs.dirty == 1 | ||
uses: actions/github-script@v3 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
github.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: ':sparkles: :star: A new commit has been added to your pull request to fix formatting! :star: :sparkles:' | ||
}) | ||
cdk-diff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup NodeJS | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12' | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install CDK | ||
run: npm install -g aws-cdk@1 | ||
|
||
- name: Checkout main | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
fetch-depth: 0 | ||
|
||
- name: Setup Artifactory | ||
uses: blackboard-innersource/gh-action-setup-artifactory@main | ||
env: | ||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | ||
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }} | ||
ARTIFACTORY_PYPI_INDEX: ${{ secrets.ARTIFACTORY_PYPI_INDEX }} | ||
ARTIFACTORY_NPM_REGISTRY: ${{ secrets.ARTIFACTORY_NPM_REGISTRY }} | ||
|
||
- name: Install main dependencies | ||
run: pip install pip-tools && pip-sync | ||
|
||
- name: CDK synth main | ||
run: cdk synth -o base.cdk.out | ||
|
||
- name: Checkout PR branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
fetch-depth: 0 | ||
clean: false | ||
|
||
- name: Merge main to PR branch | ||
run: git merge origin/main | ||
|
||
- name: Install PR branch dependencies | ||
run: pip-sync | ||
|
||
- name: CDK synth PR branch | ||
run: cdk synth -o head.cdk.out | ||
|
||
- name: Comment on Pull Request | ||
uses: actions/github-script@v3 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
var fs = require('fs'); | ||
github.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: fs.readFileSync('${{ steps.diff.outputs.comment_file }}', 'utf8') | ||
}) | ||
# Always run this last as it can push new changes and actions will not rerun. | ||
pre-commit: | ||
needs: [cdk-diff] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install PreCommit | ||
run: pip install pre-commit | ||
|
||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
|
||
- name: PreCommit | ||
id: pre-commit | ||
run: | | ||
if SKIP=flake8 pre-commit run --show-diff-on-failure --color=always --all-files; then | ||
echo "::set-output name=failed::0" | ||
else | ||
echo "::set-output name=failed::1" | ||
fi | ||
if [ -n "$(git status -s)" ]; then | ||
echo "::set-output name=dirty::1" | ||
else | ||
echo "::set-output name=dirty::0" | ||
fi | ||
# Run a second time to verify that everything has indeed been fixed. | ||
- name: PreCommit verify | ||
if: steps.pre-commit.outputs.failed == 1 | ||
run: | | ||
SKIP=flake8 pre-commit run --show-diff-on-failure --color=always --all-files | ||
- name: Commit and Push to Pull Request | ||
if: steps.pre-commit.outputs.failed == 1 && steps.pre-commit.outputs.dirty == 1 | ||
run: | | ||
git add . | ||
git status | ||
git commit -m "Automated formatting changes" | ||
git push origin ${{ github.head_ref }} | ||
- name: Comment on Pull Request | ||
if: steps.pre-commit.outputs.failed == 1 && steps.pre-commit.outputs.dirty == 1 | ||
uses: actions/github-script@v3 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
github.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: ':sparkles: :star: A new commit has been added to your pull request to fix formatting! :star: :sparkles:' | ||
}) |
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
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,7 +1,7 @@ | ||
# https://help.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' |
Oops, something went wrong.