fix: dont show PostManagementCommits
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m26s
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m26s
This commit is contained in:
@@ -108,6 +108,12 @@ const GITEA_URL = '{{ site.gitea.url }}';
|
||||
const GITEA_ORG = '{{ site.gitea.org }}';
|
||||
const GITEA_REPOS = {{ site.gitea.repos | dump | safe }};
|
||||
|
||||
const POST_MANAGEMENT_RE = /^(create|update|delete)\s+\w+\s+post$/i;
|
||||
|
||||
function isPostManagementCommit(msg) {
|
||||
return POST_MANAGEMENT_RE.test((msg || '').trim());
|
||||
}
|
||||
|
||||
function categorizeCommit(message) {
|
||||
const lower = (message || '').toLowerCase();
|
||||
if (/^feat(\(.+\))?!?:/.test(lower)) return 'features';
|
||||
@@ -177,6 +183,7 @@ function changelogApp() {
|
||||
for (const c of commits) {
|
||||
const lines = (c.commit?.message || '').split('\n');
|
||||
const title = lines[0];
|
||||
if (isPostManagementCommit(title)) continue;
|
||||
const body = lines.slice(1).join('\n').trim();
|
||||
newCommits.push({
|
||||
sha: c.sha.slice(0, 7),
|
||||
|
||||
Reference in New Issue
Block a user