github-tools / github-tools/github-release-notes

Allow manual changes to persist across --override

未關閉
#139 3 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement
主要語言
JavaScript
星號
897
分支
313
PR 合併指標
30 天內沒有已合併 PR

描述

Hello,

We've been happily using GREN on an enterprise Github instance to generate release notes based on PR data. We have a use-case where we'd like to add additional, hand-crafted release notes on top of the GREN-generated data that could be persisted even when using `--override`. This would be really useful in adding migration guides for major/breaking releases. We often end up regenerating the GREN release notes in order to add clarifications to PR titles.

Would it be possible to have the GREN-generated data live in a special block that GREN could replace rather than overwriting the entire body?

e.g., for the following release body:

```markdown
// Hand-crafted release notes here
# Migration Guide
...

// Generated GREN data goes here

```

When using `--override`, GREN would only replace/regenerate the contents between the `GREN-BEGIN` and `GREN-END` comment blocks so that any manual additions to the release notes are not overwritten. Since these blocks are just HTML comments, they wouldn't end up visible in the overall release page.

FWIW, here's the `.grenrc` that we're using. Unfortunately I can't share the specific repo data because enterprise 😕

```js
module.exports = {
dataSource: 'prs',
prefix: '',
onlyMilestones: false,
groupBy: {
'💥 Breaking Changes 💥': ['Major (Breaking Change)'],
'✨ Non-Breaking New Features ✨': ['Minor (New Feature)'],
'🛠️ Bug Fixes + Misc 🛠️': ['Patch (Bug Fix)']
},
changelogFilename: 'CHANGELOG.md'
};
```

Thanks!

貢獻指南

開啟貢獻指南

研究方向

首先追蹤 --override 進入點,以及 GREN 如何產生 release 內容,並以 .grenrc 和 CHANGELOG.md 中的範例設定作為脈絡。檢查現有的 release 內容如何被取得和取代,接著定義 GREN-BEGIN 和 GREN-END 標記的行為,包括它們不存在時會發生什麼情況。完成的標準是手動內容保持不變,只有產生的區塊會被重新整理。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript
領域
release
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。