Skip to content

v1.3.0

Choose a tag to compare

@ilyar ilyar released this 31 May 10:18
· 21 commits to main since this release
d4d65dc
yarn add -D the-ton-tech/toolchain#v1.3.0

eslint.config.mjs

export { default } from '@ton/toolchain';

custom eslint.config.mjs

import base, { tsEslint } from '@ton/toolchain';

export default [
  ...base,
  {
    plugins: {
      '@typescript-eslint': tsEslint,
    },
    rules: {
      'no-console': 'warn',
      '@typescript-eslint/no-explicit-any': 'warn',
    },
  },
];

package.json

{
  "prettier": "@ton/toolchain/prettier",
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}

GitHub Actions

QA

.github/workflows/qa.yaml

name: QA

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - uses: the-ton-tech/toolchain/lint@v1.3.0
        with:
          node-version: 22.x

  build:
    name: Test & Build
    needs: lint
    runs-on: ubuntu-latest
    steps:
      - uses: the-ton-tech/toolchain/build@v1.3.0
        with:
          node-version: 22.x

SBT Reward

This action extracts the average XPS rating from reviewers comments when a pull request is merged, posts a comment with the reward link, and applies a label to the pull request if specified

Important

By default, the XPS value is 0, it must be overridden at the final review stage by adding a comment in the review in the format XPS=N, where N is a positive integer from 0 to <xps_max>, if the value is 0, no reward is given

.github/workflows/reward.yaml

name: Reward

on:
  pull_request:
    types:
      - closed

jobs:
  reward:
    name: Reward
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    steps:
      - uses: the-ton-tech/toolchain/reward@v1.3.0
        with:
          # GitHub token used to read PR details and post comments/labels
          github_token: ${{ secrets.GITHUB_TOKEN }}
          # Credentials of TON Society Platform
          society_api_key: ${{ secrets.SOCIETY_API_KEY }}
          society_partner_id: ${{ secrets.SOCIETY_PARTNER_ID }}
          # activity identifier or alias: blueprint | sandbox | tl-b | tl-b-tool
          activity_id: <number_id>
          # (optional) minimum allowed XPS amount, default: 0
          xps_min: 0
          # (optional) maximum allowed XPS amount, default: 15000
          xps_max: 15000
          # (optional) label for marking the rewarded PR, default: ''
          on_reward_label: rewarded

Where activity_id is an identifier of the activity, for which user is rewarded, to create a new activity refer to TON Society Platform documentation