8000 Merge remote-tracking branch 'origin/main' into feature/add_mint_example · actions/cache@84e5400 · GitHub
[go: up one dir, main page]

Skip to content

Commit 84e5400

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/add_mint_example
2 parents 35f35f4 + 4723a57 commit 84e5400
  • __tests__
  • dist
  • restore
  • save
  • src
  • Some content is hidden

    Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

    103 files changed

    +258593
    -14188
    lines changed

    .devcontainer/devcontainer.json

    Lines changed: 14 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,14 @@
    1+
    {
    2+
    "name": "Node.js & TypeScript",
    3+
    "image": "mcr.microsoft.com/devcontainers/typescript-node:16-bullseye",
    4+
    // Features to add to the dev container. More info: https://containers.dev/implementors/features.
    5+
    // "features": {},
    6+
    // Use 'forwardPorts' to make a list of ports inside the container available locally.
    7+
    // "forwardPorts": [],
    8+
    // Use 'postCreateCommand' to run commands after the container is created.
    9+
    "postCreateCommand": "npm install"
    10+
    // Configure tool-specific properties.
    11+
    // "customizations": {},
    12+
    // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
    13+
    // "remoteUser": "root"
    14+
    }

    .eslintrc.json

    Lines changed: 2 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -9,15 +9,14 @@
    99
    "plugin:import/errors",
    1010
    "plugin:import/warnings",
    1111
    "plugin:import/typescript",
    12-
    "plugin:prettier/recommended",
    13-
    "prettier/@typescript-eslint"
    12+
    "plugin:prettier/recommended"
    1413
    ],
    1514
    "plugins": ["@typescript-eslint", "simple-import-sort", "jest"],
    1615
    "rules": {
    1716
    "import/first": "error",
    1817
    "import/newline-after-import": "error",
    1918
    "import/no-duplicates": "error",
    20-
    "simple-import-sort/sort": "error",
    19+
    "simple-import-sort/imports": "error",
    2120
    "sort-imports": "off"
    2221
    }
    2322
    }

    .gitattributes

    Lines changed: 2 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,2 @@
    1+
    .licenses/** -diff linguist-generated=true
    2+
    * text=auto eol=lf

    .github/CODEOWNERS

    Lines changed: 1 addition & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1 @@
    1+
    * @actions/actions-cache

    .github/pull_request_template.md

    Lines changed: 32 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,32 @@
    1+
    <!--- Provide a general summary of your changes in the Title above -->
    2+
    3+
    ## Description
    4+
    <!--- Describe your changes in detail -->
    5+
    6+
    ## Motivation and Context
    7+
    <!--- Why is this change required? What problem does it solve? -->
    8+
    <!--- If it fixes an open issue, please link to the issue here. -->
    9+
    10+
    ## How Has This Been Tested?
    11+
    <!--- Please describe in detail how you tested your changes. -->
    12+
    <!--- Include details of your testing environment, and the tests you ran to -->
    13+
    <!--- see how your change affects other areas of the code, etc. -->
    14+
    15+
    ## Screenshots (if appropriate):
    16+
    17+
    ## Types of changes
    18+
    <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
    19+
    - [ ] Bug fix (non-breaking change which fixes an issue)
    20+
    - [ ] New feature (non-breaking change which adds functionality)
    21+
    - [ ] Breaking change (fix or feature that would cause existing functionality to change)
    22+
    - [ ] Documentation (add or update README or docs)
    23+
    24+
    ## Checklist:
    25+
    <!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
    26+
    <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
    27+
    - [ ] My code follows the code style of this project.
    28+
    - [ ] My change requires a change to the documentation.
    29+
    - [ ] I have updated the documentation accordingly.
    30+
    - [ ] I have read the **CONTRIBUTING** document.
    31+
    - [ ] I have added tests to c 1241 over my changes.
    32+
    - [ ] All new and existing tests passed.

    .github/workflows/add-reviewer-pr.yml

    Lines changed: 20 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,20 @@
    1+
    name: Add Reviewer PR
    2+
    on:
    3+
    pull_request_target:
    4+
    types: [opened]
    5+
    jobs:
    6+
    run-action:
    7+
    runs-on: ubuntu-latest
    8+
    steps:
    9+
    - name: Get current oncall
    10+
    id: oncall
    11+
    run: |
    12+
    echo "CURRENT=$(curl --request GET 'https://api.pagerduty.com/oncalls?include[]=users&schedule_ids[]=P5VG2BX&earliest=true' --header 'Authorization: Token token=${{ secrets.PAGERDUTY_TOKEN }}' --header 'Accept: application/vnd.pagerduty+json;version=2' --header 'Content-Type: application/json' | jq -r '.oncalls[].user.name')" >> $GITHUB_OUTPUT
    13+
    14+
    - name: Request Review
    15+
    run: |
    16+
    curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN}}" https://api.github.com/repos/${{github.repository}}/pulls/${{ github.event.pull_request.number}}/requested_reviewers -d '{"reviewers":["${{steps.oncall.outputs.CURRENT}}"]}'
    17+
    18+
    - name: Add Assignee
    19+
    run: |
    20+
    curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN}}" https://api.github.com/repos/${{github.repository}}/issues/${{ github.event.pull_request.number}}/assignees -d '{"assignees":["${{steps.oncall.outputs.CURRENT}}"]}'

    .github/workflows/assign-issue.yml

    Lines changed: 16 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,16 @@
    1+
    name: Assign issue
    2+
    on:
    3+
    issues:
    4+
    types: [opened]
    5+
    jobs:
    6+
    run-action:
    7+
    runs-on: ubuntu-latest
    8+
    steps:
    9+
    - name: Get current oncall
    10+
    id: oncall
    11+
    run: |
    12+
    echo "CURRENT=$(curl --request GET 'https://api.pagerduty.com/oncalls?include[]=users&schedule_ids[]=P5VG2BX&earliest=true' --header 'Authorization: Token token=${{ secrets.PAGERDUTY_TOKEN }}' --header 'Accept: application/vnd.pagerduty+json;version=2' --header 'Content-Type: application/json' | jq -r '.oncalls[].user.name')" >> $GITHUB_OUTPUT
    13+
    14+
    - name: add_assignees
    15+
    run: |
    16+
    curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN}}" https://api.github.com/repos/${{github.repository}}/issues/${{ github.event.issue.number}}/assignees -d '{"assignees":["${{steps.oncall.outputs.CURRENT}}"]}'

    .github/workflows/check-dist.yml

    Lines changed: 50 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,50 @@
    1+
    # `dist/index.js` is a special file in Actions.
    2+
    # When you reference an action with `uses:` in a workflow,
    3+
    # `index.js` is the code that will run.
    4+
    # For our project, we generate this file through a build process
    5+
    # from other source files.
    6+
    # We need to make sure the checked-in `index.js` actually matches what we expect it to be.
    7+
    name: Check dist/
    8+
    9+
    on:
    10+
    push:
    11+
    branches:
    12+
    - main
    13+
    paths-ignore:
    14+
    - '**.md'
    15+
    pull_request:
    16+
    paths-ignore:
    17+
    - '**.md'
    18+
    workflow_dispatch:
    19+
    20+
    jobs:
    21+
    check-dist:
    22+
    runs-on: ubuntu-latest
    23+
    24+
    steps:
    25+
    - uses: actions/checkout@v3
    26+
    - name: Setup Node.js 16.x
    27+
    uses: actions/setup-node@v3
    28+
    with:
    29+
    node-version: 16.x
    30+
    cache: npm
    31+
    - name: Install dependencies
    32+
    run: npm ci
    33+
    - name: Rebuild the dist/ directory
    34+
    run: npm run build
    35+
    36+
    - name: Compare the expected and actual dist/ directories
    37+
    run: |
    38+
    if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
    39+
    echo "Detected uncommitted changes after build. See status below:"
    40+
    git diff
    41+
    exit 1
    42+
    fi
    43+
    id: diff
    44+
    45+
    # If index.js was different than expected, upload the expected version as an artifact
    46+
    - uses: actions/upload-artifact@v3
    47+
    if: ${{ failure() && steps.diff.conclusion == 'failure' }}
    48+
    with:
    49+
    name: dist
    50+
    path: dist/
    Lines changed: 22 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,22 @@
    1+
    name: Close inactive issues
    2+
    on:
    3+
    schedule:
    4+
    - cron: "30 8 * * *"
    5+
    6+
    jobs:
    7+
    close-issues:
    8+
    runs-on: ubuntu-latest
    9+
    permissions:
    10+
    issues: write
    11+
    pull-requests: write
    12+
    steps:
    13+
    - uses: actions/stale@v3
    14+
    with:
    15+
    days-before-issue-stale: 200
    16+
    days-before-issue-close: 5
    17+
    stale-issue-label: "stale"
    18+
    stale-issue-message: "This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days."
    19+
    close-issue-message: "This issue was closed because it has been inactive for 5 days since being marked as stale."
    20+
    days-before-pr-stale: -1
    21+
    days-before-pr-close: -1
    22+
    repo-token: ${{ secrets.GITHUB_TOKEN }}

    .github/workflows/codeql.yml

    Lines changed: 19 additions & 25 deletions
    Original file line numberDiff line numberDiff line change
    @@ -8,45 +8,39 @@ on:
    88

    99
    jobs:
    1010
    CodeQL-Build:
    11-
    12-
    # CodeQL runs on ubuntu-latest and windows-latest
    11+
    # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
    1312
    runs-on: ubuntu-latest
    1413

    14+
    permissions:
    15+
    # required for all workflows
    16+
    security-events: write
    17+
    1518
    steps:
    1619
    - name: Checkout repository
    17-
    uses: actions/checkout@v2
    18-
    with:
    19-
    # We must fetch at least the immediate parents so that if this is
    20-
    # a pull request then we can checkout the head.
    21-
    fetch-depth: 2
    22-
    23-
    # If this run was triggered by a pull request event, then checkout
    24-
    # the head of the pull request instead of the merge commit.
    25-
    - run: git checkout HEAD^2
    26-
    if: ${{ github.event_name == 'pull_request' }}
    27-
    20+
    uses: actions/checkout@v3
    21+
    2822
    # Initializes the CodeQL tools for scanning.
    2923
    - name: Initialize CodeQL
    30-
    uses: github/codeql-action/init@v1
    24+
    uses: github/codeql-action/init@v2
    3125
    # Override language selection by uncommenting this and choosing your languages
    3226
    # with:
    33-
    # languages: go, javascript, csharp, python, cpp, java
    27+
    # languages: go, javascript, csharp, python, cpp, java, ruby
    3428

    35-
    # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
    36-
    # If this step fails, then you should remove it and run the build manually (see below)
    29+
    # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
    30+
    # If this step fails, then you should remove it and run the build manually (see below).
    3731
    - name: Autobuild
    38-
    uses: github/codeql-action/autobuild@v1
    32+
    uses: github/codeql-action/autobuild@v2
    3933

    4034
    # ℹ️ Command-line programs to run using the OS shell.
    41-
    # 📚 https://git.io/JvXDl
    35+
    # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
    4236

    43-
    # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
    44-
    # and modify them (or add more) to build your code if your project
    45-
    # uses a compiled language
    37+
    # ✏️ If the Autobuild fails above, remove it and uncomment the following
    38+
    # three lines and modify them (or add more) to build your code if your
    39+
    # project uses a compiled language
    4640

    4741
    #- run: |
    48-
    # make bootstrap
    49-
    # make release
    42+
    # make bootstrap
    43+
    # make release
    5044

    5145
    - name: Perform CodeQL Analysis
    52-
    uses: github/codeql-action/analyze@v1
    46+
    uses: github/codeql-action/analyze@v2

    0 commit comments

    Comments
     (0)
    0