Skip to content

Commit

Permalink
Merge branch 'develop' into chore/folder-reorg
Browse files Browse the repository at this point in the history
  • Loading branch information
riqwan authored Jan 29, 2024
2 parents cb2ce69 + c15438c commit 4c7bf1b
Show file tree
Hide file tree
Showing 194 changed files with 5,099 additions and 743 deletions.
9 changes: 9 additions & 0 deletions .changeset/flat-bees-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@medusajs/core-flows": patch
"@medusajs/link-modules": patch
"@medusajs/medusa": patch
"@medusajs/modules-sdk": patch
"@medusajs/types": patch
---

feat: Sales Channel module
7 changes: 7 additions & 0 deletions .changeset/shy-cars-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@medusajs/stock-location": patch
"@medusajs/medusa": patch
"@medusajs/types": patch
---

feat(stock-location, medusa, types): add `q` and `order` query parameters to stock locations list endpoint
11 changes: 11 additions & 0 deletions .github/teams.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"team: medusa":
- "@olivermrbl"
- "@srindom"
- "@adrien2p"
- "@riqwan"
- "@fPolic"
- "@shahednasser"
- "@carlos-r-l-rodrigues"
- "@VariableVic"
- "@kasperkristensen"
- "@pKorsholm"
82 changes: 82 additions & 0 deletions .github/workflows/generate-docblocks-reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Generate References for Docblocks [Automated]

on:
pull_request:
branches:
- develop
types:
- closed
workflow_dispatch:
inputs:
referenceName:
description: 'Reference to Generate. Use either `all` or a name of a config file in `docs-util/packages/typedoc-config` such as `product`.'
required: false
default: 'all'

jobs:
references:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || (startsWith(github.head_ref, 'chore/generate-tsdocs') && github.event.pull_request.merged == true)
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
cache: "yarn"

- name: Install dependencies
uses: ./.github/actions/cache-deps
with:
extension: reference

- name: Build Packages
run: yarn build

- name: Install Docs dependencies
working-directory: www
run: yarn install

- name: Install Workspace dependencies
run: yarn install
working-directory: docs-util

- name: Build Workspace dependencies
run: yarn build
working-directory: docs-util

- name: Generate References
if: ${{ github.event_name == 'workflow_dispatch' }}
run: "yarn generate:reference ${{ github.event.inputs.referenceName }}"
working-directory: docs-util/packages/scripts

- name: Generate References
if: ${{ github.event_name != 'workflow_dispatch' }}
run: "yarn generate:reference all"
working-directory: docs-util/packages/scripts

- name: Get PR Message
id: pr-message
run: yarn generate:message
working-directory: docs-util/packages/scripts

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: "chore(docs): Generated References (automated)"
base: "develop"
title: "chore(docs): Generated References"
labels: "type: chore"
add-paths: www/apps/docs/content/references/**
branch: "docs/generate-reference"
branch-suffix: "timestamp"
body: ${{ steps.pr-message.outputs.body }}
53 changes: 53 additions & 0 deletions .github/workflows/generate-docblocks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Generate Docblocks [Automated]

on:
pull_request:
branches:
- develop
types:
- closed
workflow_dispatch:

jobs:
generate:
if: github.event_name == 'workflow_dispatch' || (startsWith(github.head_ref, 'changeset-release/develop') && github.event.pull_request.merged == true)
name: Generated TSDoc PRs
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Dependencies
run: yarn

- name: Install docs-util Dependencies
run: yarn
working-directory: docs-util

- name: Build packages
run: yarn build
working-directory: docs-util

- name: Run docblock generator
run: "yarn start run:release"
working-directory: docs-util/packages/docblock-generator
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_OWNER: ${{ github.repository_owner }}
GIT_REPO: medusa

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: "Generated TSDocs"
body: "This PR holds all generated TSDocs for the upcoming release."
branch: "chore/generate-tsdocs"
team-reviewers: "@medusajs/docs"
add-paths: packages/**
67 changes: 1 addition & 66 deletions .github/workflows/generate-references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,78 +3,13 @@ on:
workflow_dispatch:
inputs:
referenceName:
description: 'Reference to Generate. Use either `all` to generate all references, `api` to generate the API reference, or a name of a config file in `docs-util/packages/typedoc-config` such as `product`'
description: 'Reference to Generate. Use either `all` to generate all references, `api` to generate the API reference, or `ui` to generate UI reference.'
required: false
default: 'all'
release:
types: [published]

jobs:
references:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
cache: "yarn"

- name: Install dependencies
uses: ./.github/actions/cache-deps
with:
extension: reference

- name: Build Packages
run: yarn build

- name: Install Docs dependencies
working-directory: www
run: yarn install

- name: Install Workspace dependencies
run: yarn install
working-directory: docs-util

- name: Build Workspace dependencies
run: yarn build
working-directory: docs-util

- name: Generate References
if: ${{ github.event_name == 'workflow_dispatch' }}
run: "yarn generate:reference ${{ github.event.inputs.referenceName }}"
working-directory: docs-util/packages/scripts

- name: Generate References
if: ${{ github.event_name != 'workflow_dispatch' }}
run: "yarn generate:reference all"
working-directory: docs-util/packages/scripts

- name: Get PR Message
id: pr-message
run: yarn generate:message
working-directory: docs-util/packages/scripts

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: "chore(docs): Generated References (automated)"
base: "develop"
title: "chore(docs): Generated References"
labels: "type: chore"
add-paths: www/apps/docs/content/references/**
branch: "docs/generate-reference"
branch-suffix: "timestamp"
body: ${{ steps.pr-message.outputs.body }}
api:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' || github.event.inputs.referenceName == 'all' || github.event.inputs.referenceName == 'api' }}
Expand Down
42 changes: 1 addition & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,44 +37,4 @@ jobs:
- name: Create Release Pull Request
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tsdoc-pr:
name: Generated TSDoc PRs
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Dependencies
run: yarn

- name: Build packages
run: yarn build

- name: Install docs-util Dependencies
run: yarn
working-directory: docs-util

- name: Build packages
run: yarn build
working-directory: docs-util

- name: Run docblock generator
run: "yarn start run:commit ${{ github.sha }}"
working-directory: docs-util/packages/docblock-generator

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: "Generated TSDocs"
body: "This PR holds all generated TSDocs for the upcoming release."
branch: "chore/generate-tsdocs"
team-reviewers: "@medusajs/docs"
add-paths: packages/**
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/team-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on:
pull_request:
issues:
name: Label PR with team
permissions:
contents: read
pull-requests: write
jobs:
team-labeler:
runs-on: ubuntu-latest
steps:
- uses: JulienKode/team-labeler-action@v1.1.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
6 changes: 4 additions & 2 deletions docs-util/packages/docblock-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "docblock-generator",
"license": "MIT",
"scripts": {
"start": "ts-node src/index.ts",
"dev": "ts-node src/index.ts",
"start": "node dist/index.js",
"build": "tsc",
"watch": "tsc --watch",
"prepublishOnly": "cross-env NODE_ENV=production tsc --build"
Expand All @@ -23,7 +24,8 @@
"eslint": "^8.56.0",
"minimatch": "^9.0.3",
"ts-node": "^10.9.1",
"typescript": "5.2"
"typescript": "5.2",
"utils": "*"
},
"devDependencies": {
"@types/node": "^20.9.4"
Expand Down
Loading

0 comments on commit 4c7bf1b

Please sign in to comment.