Skip to content

Commit

Permalink
Main -> Val (#139833)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsummers1 authored Nov 25, 2024
2 parents a38d456 + fbc2985 commit b67ad33
Show file tree
Hide file tree
Showing 29 changed files with 2,936 additions and 2,617 deletions.
5 changes: 3 additions & 2 deletions .github/branchNameValidation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -e

local_branch=${1}
[ -z "${1}" ] && local_branch=$(git rev-parse --abbrev-ref HEAD)

valid_branch='^[a-z][a-z0-9-]*$'

Expand All @@ -15,7 +16,7 @@ join_by() { local IFS='|'; echo "$*"; }
#creates glob match to check for reserved words used in branch names which would trigger failures
glob=$(join_by $(for i in ${reserved_words[@]}; do echo "^$i-|-$i$|-$i-|^$i$"; done;))

if [[ ! $local_branch =~ $valid_branch ]] || [[ $local_branch =~ $glob ]] || [[ ${#local_branch} -gt 64 ]]; then
if [[ ! $local_branch =~ $valid_branch ]] || [[ $local_branch =~ $glob ]] || [[ ${#local_branch} -gt 20 ]]; then
echo """
------------------------------------------------------------------------------------------------------------------------------
ERROR: Please read below
Expand All @@ -28,7 +29,7 @@ if [[ ! $local_branch =~ $valid_branch ]] || [[ $local_branch =~ $glob ]] || [[
Therefore, the branch name must be a valid service name. Branch name must be all lower case with no spaces and no underscores.
From Serverless:
A service name should only contain alphanumeric (case sensitive) and hyphens. It should start with an alphabetic character and shouldnt exceed 128 characters.
A service name should only contain alphanumeric (case sensitive) and hyphens. It should start with an alphabetic character and shouldnt exceed 20 characters.
For Github Actions support, please push your code to a new branch with a name that meets Serverless' service name requirements.
So, make a new branch with a name that begins with a letter and is made up of only letters, numbers, and hyphens... then delete this branch.
------------------------------------------------------------------------------------------------------------------------------
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ jobs:
with:
role-to-assume: ${{ env.AWS_OIDC_ROLE_TO_ASSUME }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Delete topics from bigmac
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Delete Topics
repo: Enterprise-CMCS/bigmac
token: ${{ secrets.AUTOMATION_ACCESS_TOKEN }}
inputs: '{ "topics": "mgmt.connect.cms-carts-seds.carts-bigmac-streams-${{env.BRANCH_NAME}}.config,mgmt.connect.cms-carts-seds.carts-bigmac-streams-${{env.BRANCH_NAME}}.offsets,mgmt.connect.cms-carts-seds.carts-bigmac-streams-${{env.BRANCH_NAME}}.status"}'
ref: refs/heads/master # Otherwise workflow-dispatch tries to operate off of our default name
# - name: Delete topics from bigmac
# uses: benc-uk/workflow-dispatch@v1
# with:
# workflow: Delete Topics
# repo: Enterprise-CMCS/bigmac
# token: ${{ secrets.AUTOMATION_ACCESS_TOKEN }}
# inputs: '{ "topics": "mgmt.connect.cms-carts-seds.carts-bigmac-streams-${{env.BRANCH_NAME}}.config,mgmt.connect.cms-carts-seds.carts-bigmac-streams-${{env.BRANCH_NAME}}.offsets,mgmt.connect.cms-carts-seds.carts-bigmac-streams-${{env.BRANCH_NAME}}.status"}'
# ref: refs/heads/master # Otherwise workflow-dispatch tries to operate off of our default name
- name: Destroy
run: ./run destroy --stage $STAGE_PREFIX$branch_name --verify false

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/pr-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ permissions:
contents: write
issues: write
pull-requests: write

jobs:
endpoint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -40,15 +39,15 @@ jobs:
application_endpoint_url="endpoint not found"
fi
echo "application_endpoint_url=$application_endpoint_url" >> $GITHUB_OUTPUT
outputs:
application_endpoint_url: ${{ steps.getendpoint.outputs.application_endpoint_url }}

notify_integrations_channel:
runs-on: ubuntu-latest
needs:
- endpoint
# avoiding notifications for automated Snyk Pull Requests and draft pull requests
# avoiding notifications for automated Snyk Pull Requests and draft pull requests
if: github.actor != 'mdct-github-service-account' && !github.event.pull_request.draft
steps:
- name: Slack Notification
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ name: Pull-request
on: [pull_request]

jobs:
prchecks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Configure pre-commit to skip branch name validation
run: |
echo "SKIP=branch-name-validation" >> $GITHUB_ENV
- uses: pre-commit/[email protected]
linting:
runs-on: ubuntu-latest
steps:
Expand All @@ -11,7 +22,6 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: pre-commit/[email protected]
jest-frontend:
runs-on: ubuntu-latest
steps:
Expand Down
11 changes: 9 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: 'seed-section-base-*'
exclude: "seed-section-base-*"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
Expand Down Expand Up @@ -38,4 +38,11 @@ repos:
- repo: https://github.com/zricethezav/gitleaks
rev: v8.12.0
hooks:
- id: gitleaks
- id: gitleaks
- repo: local
hooks:
- id: branch-name-validation
name: branch-name-validation
entry: .github/branchNameValidation.sh
language: script
pass_filenames: false
12 changes: 6 additions & 6 deletions services/app-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
"typescript": "^4.5.4"
},
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.662.0",
"@aws-sdk/client-s3": "^3.662.0",
"@aws-sdk/client-ssm": "^3.662.0",
"@aws-sdk/lib-dynamodb": "^3.662.0",
"@aws-sdk/s3-request-presigner": "^3.662.0",
"@aws-sdk/client-dynamodb": "^3.687.0",
"@aws-sdk/client-s3": "^3.687.0",
"@aws-sdk/client-ssm": "^3.687.0",
"@aws-sdk/lib-dynamodb": "^3.687.0",
"@aws-sdk/s3-request-presigner": "^3.687.0",
"aws-jwt-verify": "^3.1.0",
"dompurify": "^3.1.4",
"jsdom": "^24.1.0",
"jsonpath-plus": "^10.0.7",
"jsonpath-plus": "^10.2.0",
"jsonschema": "^1.4.1",
"jwt-decode": "^3.1.2",
"uuid": "^7.0.3"
Expand Down
Loading

0 comments on commit b67ad33

Please sign in to comment.