Skip to content

Commit

Permalink
[infra] Adds order id validation action (mui#13957)
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com>
  • Loading branch information
michelengelen authored and thomasmoon committed Sep 6, 2024
1 parent 5bc9d9e commit b99e3ea
Show file tree
Hide file tree
Showing 4 changed files with 250 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/order-id-validator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Order ID validation

on:
issues:
types: [opened]

jobs:
validate-order-id:
runs-on: ubuntu-latest
name: Label issue based on order ID
steps:
- uses: actions/checkout@v3
- name: Label issue
uses: actions/github-script@v7
with:
script: |
const script = require('./scripts/orderIdValidation.js')
await script(core, github)
env:
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORDER_API_TOKEN: ${{ secrets.SHOP_AUTH_TOKEN }}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
"clean:node_modules": "rimraf --glob \"**/node_modules\""
},
"devDependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
"@argos-ci/core": "^2.4.0",
"@babel/cli": "^7.24.8",
"@babel/core": "^7.24.9",
Expand Down
146 changes: 146 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b99e3ea

Please sign in to comment.