fix(kafka): cast topic to str since it can return None #80928
Workflow file for this run
This file contains 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-name | |
on: | |
pull_request: | |
types: ['opened', 'edited', 'reopened', 'synchronize'] | |
branches-ignore: | |
- "[0-9]+.[0-9]+" | |
jobs: | |
pr_name_lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
name: Install Node.js | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: | | |
npm install @commitlint/[email protected] @commitlint/[email protected] @commitlint/[email protected] @actions/core | |
- name: Lint PR name | |
uses: actions/[email protected] | |
with: | |
script: | | |
const load = require('@commitlint/load').default; | |
const lint = require('@commitlint/lint').default; | |
const CONFIG = { | |
extends: ['./commitlint.config.js'], | |
}; | |
const title = context.payload.pull_request.title; | |
core.info(`Linting: ${title}`); | |
load(CONFIG) | |
.then((opts) => { | |
lint( | |
title, | |
opts.rules, | |
opts.parserPreset ? {parserOpts: opts.parserPreset.parserOpts} : {} | |
).then((report) => { | |
report.warnings.forEach((warning) => { | |
core.warning(warning.message); | |
}); | |
report.errors.forEach((error) => { | |
core.error(error.message); | |
}); | |
if (!report.valid) { | |
core.setFailed("PR title linting failed"); | |
} | |
}); | |
}); |