accounts/usbwallet: add support for Ledger Nano Gen5 #1906
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Format Validation | |
| on: | |
| pull_request: | |
| types: [opened, edited, synchronize] | |
| jobs: | |
| validate-pr: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Check PR Title Format | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const prTitle = context.payload.pull_request.title; | |
| const titleRegex = /^([\w\s,{}/.]+): .+/; | |
| if (!titleRegex.test(prTitle)) { | |
| core.setFailed(`PR title "${prTitle}" does not match required format: directory, ...: description`); | |
| return; | |
| } | |
| const match = prTitle.match(titleRegex); | |
| const dirPart = match[1]; | |
| const directories = dirPart.split(',').map(d => d.trim()); | |
| const missingDirs = []; | |
| for (const dir of directories) { | |
| const fullPath = path.join(process.env.GITHUB_WORKSPACE, dir); | |
| if (!fs.existsSync(fullPath)) { | |
| missingDirs.push(dir); | |
| } | |
| } | |
| if (missingDirs.length > 0) { | |
| core.setFailed(`The following directories in the PR title do not exist: ${missingDirs.join(', ')}`); | |
| return; | |
| } | |
| console.log('✅ PR title format is valid'); |