ezard / semantic-prs Goto Github PK
View Code? Open in Web Editor NEWA GitHub app to check that pull requests follow the Conventional Commits spec
License: MIT License
A GitHub app to check that pull requests follow the Conventional Commits spec
License: MIT License
Please leave it up to each repository to enable it explicitly. 99% of orgs/users have mixed content, and forcing users to disable it other repositories, instead of enabling it where it is needed, is bad UX in my opinion. Using app installation to do that is also something I would not recommend.
I did not test it, but from the look of the code, if you want to have org defaults, you can create special repo .github
and octokit-plugin-config will try to load required file from that repo as a fallback. If course, that can be also used to disable it globally, but I would still not recommend going this route.
Of course, its your app and configure it however you see fit, but I'll personally never use a tool, that forces itself into my way every time, instead of serving me when I need it.
dependabot sometimes creates pr that start with "Build" which is valid according to conventional commit spec but semantic pr always fails for those prs
Build(deps-dev): Bump typescript from 5.0.4 to 5.1.3
No response
currently, failure message does not describe why the check failed.
semantic-prs/functions/src/handle-pull-request-change.ts
Lines 90 to 102 in afe753c
while using semantic PR in https://github.com/cataclysmbnteam/Cataclysm-BN, we found out that new contributors had a hard time figuring out why their PR failed. for example:
I have no clue what the Semantic PR bot is angry about with my latest PR's title, but oh well. At least all the actually important tests came back okay lol
giving context-aware error message will help new contributors greatly.
make error message aware of configuration context. for example, with this configuration, each error cases could have been:
feat : foo
feat
feat
and :
foo
- feat : foo
+ feat: foo
feature: foo
feature
.feat
, fix
, docs
, style
, refactor
, perf
, test
, build
, ci
, chore
, revert
.feat
?- feature: foo
+ feat: foo
feat(): bar
()
- feat(): bar
+ feat: bar
feat(ui): baz
ui
.content
, UI
, i18n
, balance
, ...UI
?- feat(ui): baz
+ feat(UI): baz
Currently, if semantic-prs reports fails, the "details" button jump to this repo instead of a concrete info about violations.
hi, i'd like to apply conventional PR titles for our project, and thought it'd be neat to define valid scopes by regex. for example:
scopes:
- 'mods/(\w+)'
would match titles such as
feat(mods/foo): ...
feat(mods/bar): ...
i'm interested in opening a PR for this feature.
relevent lines:
semantic-prs/functions/src/is-message-semantic.ts
Lines 36 to 37 in 2915f0c
I've set targetUrl
to a custom URL, but as the screenshot shows below, it's not being used:
The semantic.yaml file is already merged to main and the branch PR is up to date with main.
In fact, I'm not even sure it's using the semantic.yaml config at all, as I've set anyCommit: false
, and titleAndCommits: true
and it's only checking for commit message instead of both.
The file is located at .github/semantic.yaml
enabled: true
titleOnly: false
commitsOnly: false
titleAndCommits: true
anyCommit: false
types:
- feat
- fix
- docs
- refactor
- ci
- chore
allowMergeCommits: true
allowRevertCommits: false
targetUrl: https://www.conventionalcommits.org/en/v1.0.0/
test
feat: test
feat(foo, bar): baz
-> Fails
feat(foo,bar): baz
-> OK
feat(foo, bar): baz
-> OK
feat(foo,bar): baz
-> OK
I'm willing to open a PR.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
node
, @types/node
)@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
).github/workflows/cache-dependencies.yml
actions/checkout v4
actions/setup-node v4
actions/cache v4
.github/workflows/ci.yml
actions/checkout v4
actions/setup-node v4
actions/cache v4
functions/package.json
@conventional-commits/parser 0.4.1
conventional-commit-types 3.0.0
firebase-functions 4.9.0
probot 12.4.0
@octokit/webhooks-types 7.5.1
@stryker-mutator/core 8.5.0
@stryker-mutator/jest-runner 8.5.0
@stryker-mutator/typescript-checker 8.5.0
@types/jest 29.5.12
@types/node 18.19.47
@typescript-eslint/eslint-plugin 7.18.0
@typescript-eslint/parser 7.18.0
eslint 8.57.0
eslint-config-prettier 9.1.0
eslint-plugin-import 2.29.1
firebase-functions-test 3.3.0
firebase-tools 13.16.0
jest 29.7.0
nock 13.5.5
prettier 3.3.3
smee-client 2.0.3
ts-jest 29.2.5
typescript 5.5.4
node 18
I have a PR (pawellabaj/auto-record#102) with many commits with message: "feat: Allowed to implement extension for compact constructor updating", eg. pawellabaj/auto-record@c3a6c50
Semantic PR is false
n/a
No response
feat: Allowed to implement extension for compact constructor updating
After enable Semantic PRs on bytebase/bytebase and close & reopen PR bytebase/bytebase#1445, it seems Semantic PRs app doesn't report the status. Only new (created) PRs will trigger the App.
Is it possible to (re)check and report the status when a PR is reopened?
from cataclysmbnteam/Cataclysm-BN#4329
enabled: true
titleOnly: true
targetUrl: 'https://docs.cataclysmbn.org/en/contribute/changelog_guidelines/'
types:
- feat
- fix
- docs
- style
- refactor
- perf
- test
- build
- ci
- chore
- revert
# irrelevant configs skipped
feat(content):Cooking with insect eggs
No response
Hello! We've been using this app happily for quite a while now and we want to expand to have it enabled on all repos in our org.
Would it be possible for the GitHub App to look for org-wide config defaults in a specific repo within the org?
So the decision tree would then be:
semantic.yml
file, use it.semantic.yml
file, use it.The README says that the app can be configured by:
creating a
semantic.yml
file in your.github
directory...
However, if you create a PR adding this semantic.yml
file, the settings will not be reflected in that PR. Even a PR into your new branch with a semantic.yml
will not reflect the config changes. It looks like Probot's context.config("semantic.yml")
function gets the config file from the repositories default branch. This means a user's config settings won't be reflected in PRs until the semantic.yml
is merged into the default branch.
Hey, thanks for this drop-in replacement for Semantic Pull Requests!
The only issue we have is that the check doesn't appear to run in our private repositories, I'm guessing this isn't intentional behaviour?
Thanks
When adding a PR to a merge queue in a repo where this check is required according to branch protection rules, it hangs with "Waiting for status to be reported".
I think the fix could be as simple as triggering this check on a pull_request.enqueued
event.
Thanks!
# Config ref: https://github.com/Ezard/semantic-prs
# Validate the PR title, and ignore all commit messages
titleOnly: true
# Provides a custom URL for the "Details" link, which appears next to the success/failure message from the app:
targetUrl: https://docs.meltano.com/contribute/merge#semantic-prs
# The values allowed for the "type" part of the PR title/commit message.
# e.g. for a PR title/commit message of "feat: add some stuff", the type would be "feat"
types:
- ci
- chore
- build
- break
- change
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test
# The values allowed for the "scope" part of the PR title/commit message.
# e.g. for a PR title/commit message of "feat(awesome-feature): add some stuff",
# the scope would be "awesome-feature"
scopes:
- core
- cli
- cloud
- deps
- deps-dev
No response
No response
I am very much enjoying this app and we're implementing here in our open source project: meltano/sdk#686
We added a section to our contributors guide with description of expectations. I'd like to request (and perhaps contribute if helpful) a feature to customize the "more details" error url to accept a custom link.
Is that something that would be accepted? And if yes, could someone kindly point me in the right direction?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.