Skip to content

feat(profiling): make dictionary ids comparable in api2 #918

feat(profiling): make dictionary ids comparable in api2

feat(profiling): make dictionary ids comparable in api2 #918

Workflow file for this run

name: pr-name
permissions:
pull-requests : read
contents: read
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
branches-ignore:
- "v[0-9]+.[0-9]+.[0-9]+"
- release
jobs:
pr_name_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
name: Install Node.js
with:
node-version: 16
- name: Install dependencies
run: |
npm install @commitlint/lint@18.6.1 @commitlint/load@18.6.1 @commitlint/config-conventional@18.6.2 @actions/core
- name: Lint PR name
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
with:
script: |
const load = require('@commitlint/load').default;
const lint = require('@commitlint/lint').default;
const CONFIG = {
extends: ['./.config/commitlint.config.js'],
};
const title = context.payload.pull_request.title;
core.info(`Linting: ${title}`);
load(CONFIG)
.then((opts) => {
lint(
title,
opts.rules,
{
parserOpts: opts.parserPreset?.parserOpts,
plugins: opts.plugins,
}
).then((report) => {
report.warnings.forEach((warning) => {
core.warning(warning.message);
});
report.errors.forEach((error) => {
core.error(error.message);
});
if (!report.valid) {
core.info('');
core.info('============================================');
core.info('❌ PR TITLE VALIDATION FAILED');
core.info('============================================');
core.info('');
core.info(`PR Title: ${title}`);
core.info('');
core.info('Errors found:');
report.errors.forEach((error) => {
core.info(` - ${error.message}`);
});
if (report.warnings.length > 0) {
core.info('');
core.info('Warnings:');
report.warnings.forEach((warning) => {
core.info(` - ${warning.message}`);
});
}
core.info('');
core.info('============================================');
core.info('PR TITLE FORMAT GUIDE');
core.info('============================================');
core.info('');
core.info('Expected format: type(scope): description');
core.info('');
core.info('Valid types:');
core.info(' feat - A new feature (triggers minor version bump)');
core.info(' fix - A bug fix (triggers patch version bump)');
core.info(' docs - Documentation only changes');
core.info(' style - Code style changes (formatting, semicolons, etc)');
core.info(' refactor - Code change that neither fixes a bug nor adds a feature');
core.info(' perf - Performance improvement');
core.info(' test - Adding or correcting tests');
core.info(' build - Changes to build system or dependencies');
core.info(' ci - Changes to CI configuration');
core.info(' chore - Other changes that don\'t modify src or test files');
core.info(' revert - Reverts a previous commit');
core.info('');
core.info('Breaking changes: Add ! after type, e.g., feat!: or fix(scope)!:');
core.info('');
core.info('Scope is optional but recommended for clarity.');
core.info('');
core.info('Ticket references: If included, must be at the END of the title');
core.info(' ✓ feat(api): add new endpoint [PROJ-123]');
core.info(' ✗ feat(api): [PROJ-123] add new endpoint');
core.info('');
core.info('Examples of valid PR titles:');
core.info(' feat: add user authentication');
core.info(' fix(parser): handle edge case in tokenizer');
core.info(' feat!: redesign public API');
core.info(' docs: update README with examples [PROJ-456]');
core.info('');
core.setFailed("PR title linting failed - see format guide above");
}
});
});