Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/jsonwebtoken-9.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dyersituations committed Jul 11, 2024
2 parents 805ef48 + 937492e commit 82f7d08
Show file tree
Hide file tree
Showing 295 changed files with 52,939 additions and 33,452 deletions.
13 changes: 4 additions & 9 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ addReviewers: false
# Set to true to add assignees to pull requests
addAssignees: true

# A list of reviewers to be added to pull requests (GitHub user name)
# reviewers:
# - eddieferrer
# - emuvente
# - mcstover
# - dyersituations
# - egoroza

# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0
Expand All @@ -22,7 +14,10 @@ assignees:
- emuvente
- mcstover
- dyersituations
- egoroza
- tiarascoleman
- michelleinez
- roger-in-kiva
- christian14b

# A number of assignees to add to the pull request
# Set to 0 to add all of the assignees.
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/lint-name.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint PR (semantic title)

on:
pull_request:
types:
- opened
- synchronize
- edited

env:
GITHUB_PAT: "${{ secrets.KIVA_ROBOT_GITHUB_PAT || github.token }}"

jobs:
lint-title:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: kiva/github-actions
ref: main
token: ${{ env.GITHUB_PAT }}
path: .github/
- name: lint-pr
uses: ./.github/actions/lint-pr
env:
GITHUB_PAT: ${{ env.GITHUB_PAT }}
97 changes: 97 additions & 0 deletions .github/workflows/release-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Docker Build Publish

on:
pull_request:
push:
branches:
- main

env:
GITHUB_PAT: "${{ secrets.KIVA_ROBOT_GITHUB_PAT || github.token }}"
AWS_REGION: "us-west-2"
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
SLACK_BOT_TOKEN: "${{ secrets.SLACK_TOKEN }}"
SLACK_CHANNEL: "eng-build-failures"

jobs:
test-build:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
env:
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: kiva/github-actions
ref: main
token: ${{ env.GITHUB_PAT }}
path: .github/
- uses: snow-actions/[email protected]
with:
repository: kiva/marketplace-web-ui-ci
token: ${{ env.GITHUB_PAT }}
path: .docker
ref: main
patterns: |
resources/org/kiva/marketplaceWebUiCi/ui
- name: move files
run: |
mv .docker/resources/org/kiva/marketplaceWebUiCi/ui/Dockerfile .
- name: build static assets
uses: ./.github/actions/npm-run
with:
command: "build"
- name: docker-build
uses: ./.github/actions/docker-build-push
if: github.event_name == 'pull_request'
with:
dockerfile_target: "release"
push: false
# Build and push the image to ECR
build:
runs-on: ubuntu-latest
# Run on merges to development (main)
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout actions
uses: actions/checkout@v3
with:
repository: kiva/github-actions
ref: main
token: ${{ env.GITHUB_PAT }}
path: .github/
- uses: snow-actions/[email protected]
with:
repository: kiva/marketplace-web-ui-ci
token: ${{ env.GITHUB_PAT }}
path: .docker
ref: main
patterns: |
resources/org/kiva/marketplaceWebUiCi/ui
- name: move files
run: |
mv .docker/resources/org/kiva/marketplaceWebUiCi/ui/Dockerfile .
- name: build static assets
uses: ./.github/actions/npm-run
with:
command: "build"
- name: upload static assets
uses: ./.github/actions/upload-static-assets
with:
source_dir: "dist"
include: "static/*"
cache_control: "public,max-age=31536000"
- name: docker-push
uses: ./.github/actions/docker-build-push
with:
dockerfile_target: "release"
push: true
98 changes: 98 additions & 0 deletions .github/workflows/semantic-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Semantic Release

on:
workflow_dispatch:
inputs:
environment:
type: choice
description: 'Environment to release to. Select "staging" for a pre-release or "production" for a full release.'
options:
- staging
- production
required: true
push:
branches:
- staging
- production

concurrency:
group: kiva-ui-semantic-release

jobs:
# Create a release
create-release:
runs-on: ubuntu-latest
outputs:
published: ${{ steps.release.outputs.published }}
tag: ${{ steps.release.outputs.tag }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
token: ${{ secrets.KIVA_ROBOT_GITHUB_PAT }}
- name: Checkout actions
uses: actions/checkout@v4
with:
repository: kiva/github-actions
token: ${{ secrets.KIVA_ROBOT_GITHUB_PAT }}
path: .github/
- name: Run semantic-release
id: release
uses: ./.github/actions/semantic-release
env:
GITHUB_PAT: ${{ secrets.KIVA_ROBOT_GITHUB_PAT }}
with:
config: "node"
environment: ${{ github.event.inputs.environment }}

# Build and push the image to ECR if the release was published
build-image:
runs-on: ubuntu-latest
needs: create-release
if: needs.create-release.outputs.published == 'true'
env:
GITHUB_PAT: "${{ secrets.KIVA_ROBOT_GITHUB_PAT }}"
AWS_REGION: "us-west-2"
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
SLACK_BOT_TOKEN: "${{ secrets.SLACK_TOKEN }}"
SLACK_CHANNEL: "eng-build-failures"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.create-release.outputs.tag }}
- uses: actions/checkout@v4
with:
repository: kiva/github-actions
token: ${{ env.GITHUB_PAT }}
path: .github/
- uses: snow-actions/[email protected]
with:
repository: kiva/marketplace-web-ui-ci
token: ${{ env.GITHUB_PAT }}
path: .docker
ref: main
patterns: |
resources/org/kiva/marketplaceWebUiCi/ui
- name: move files
run: |
mv .docker/resources/org/kiva/marketplaceWebUiCi/ui/Dockerfile .
- name: build static assets
uses: ./.github/actions/npm-run
with:
command: "build"
- name: upload static assets
uses: ./.github/actions/upload-static-assets
with:
source_dir: "dist"
include: "static/*"
cache_control: "public,max-age=31536000"
- name: docker-build
uses: ./.github/actions/docker-build-push
with:
dockerfile_target: "release"
push: true
tag_source: "git"
6 changes: 3 additions & 3 deletions .storybook/mixins/apollo-story-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ export default ({
loading = false,
} = {}) => {
// Add to basket button expects basketAddInterstitial
const queryData = { ...queryResult, data: { ...queryResult.data, basketAddInterstitial: {} } };
const queryData = { ...queryResult.data, data: { ...queryResult.data, basketAddInterstitial: {} } };

return {
provide: {
apollo: {
mutate() {
return loading ? new Promise(() => {}) : Promise.resolve(mutationResult);
return loading ? new Promise(() => { }) : Promise.resolve(mutationResult);
},
readQuery() {
return queryData;
Expand All @@ -22,7 +22,7 @@ export default ({
};
},
query() {
return loading ? new Promise(() => {}) : Promise.resolve(queryData);
return loading ? new Promise(() => { }) : Promise.resolve(queryData);
},
readFragment() {
return fragmentResult;
Expand Down
53 changes: 53 additions & 0 deletions .storybook/mock-data/activity-feed-data-mock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
export default {
lend: {
loan: {
lendingActions: {
values: [
{
latestSharePurchaseDate: '2023-11-13T10:51:10Z',
lender: {
name: 'Erica',
image: {
url: 'https://www.development.kiva.org/img/s100/4d844ac2c0b77a8a522741b908ea5c32.jpg',
},
},
shareAmount: '5.00',
__typename: 'LendingAction',
},
{
latestSharePurchaseDate: '2023-11-08T02:32:20Z',
lender: {
name: 'Joy',
image: {
url: 'https://www.development.kiva.org/img/s100/4d844ac2c0b77a8a522741b908ea5c32.jpg',
},
},
shareAmount: '25.00',
__typename: 'LendingAction',
},
],
__typename: 'LendingActionCollection',
},
comments: {
values: [
{
date: '2023-11-08T02:37:56Z',
authorName: 'Joy', // eslint-disable-next-line max-len
body: 'I know him and his wife and they work hard to make everything they do the best. His farm and bake goods are amazing. He just keeps working harder and harder to do more and reach out to the community in everyway.',
authorLendingAction: {
lender: {
image: {
url: 'https://www.development.kiva.org/img/s100/4d844ac2c0b77a8a522741b908ea5c32.jpg',
},
},
},
__typename: 'Comment',
},
],
_typename: 'CommentCollection',
},
__typename: 'LoanDirect',
},
__typename: 'Lend',
},
};
Loading

0 comments on commit 82f7d08

Please sign in to comment.