chore: rewrite PR title linting workflow in py3#30
chore: rewrite PR title linting workflow in py3#30fa7ad wants to merge 5 commits intocloudscape-design:mainfrom
Conversation
Co-authored-by: Avinash Dwarapu <dwaraa@amazon.com>
Co-authored-by: Avinash Dwarapu <dwaraa@amazon.com>
Co-authored-by: Avinash Dwarapu <dwaraa@amazon.com>
|
We are a team of front-end engineers and our primary language is Javascript/Typescript. I got the point of python being built-in, but |
avinashbot
left a comment
There was a problem hiding this comment.
I definitely support merging this, regardless of whether it might be TypeScript/JavaScript in the future. It looks like the regex syntax was pretty bash-on-linux-only and not particularly portable, so this is an objective improvement. And a higher-level language is always nice for any future grammatical tricks.
I'll leave it to the team to decide whether we still want to consider redoing this in JavaScript in the future. But this PR's already here, and I like it. I'll leave it to you whether you think it's worth merging now or waiting until later.
|
Discussed as a team. All our infra uses Javascript, so this feature needs to be in JS too |
Issue #, if available:
None
Description of changes:
This is a complete rewrite of the script in python, using as little regex as possible.
Github Actions natively support inline python script, and I'd argue its more readable than bash-ism like
[[and=~.I like regex, but a long regex is very difficult to debug and opens us up to horrible possibilities like ReDoS. That said, feel free to use more regex features from python's
remodule to improve the script even more.Because it's Friday, and there is an improvement (albeit small); you can now see why the linting failed.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.