Skip to content

Commit 8c275eb

Browse files
#155 - Improve direct commit docs (#156)
- Improved docs. Added warning for `warning` disable.
1 parent 10231b4 commit 8c275eb

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ Generate Release Notes action is dedicated to enhance the quality and organizati
7474
| `warnings` | Set to true to print service chapters in the release notes. These warnings identify issues without release notes, without user-defined labels, or without associated pull requests, and PRs without linked issues. | No | true (Service chapters are printed.) |
7575
| `print-empty-chapters` | Set it to true to print chapters with no issues or PRs. | No | true (Empty chapters are printed.) |
7676

77+
> [!WARNING]
78+
> - `warnings`
79+
> - **Disabling this feature will hide service chapter showing direct commits!** These cannot be visible in custom chapters as they do not have labels!
80+
81+
7782
## Outputs
7883
The output of the action is a markdown string containing the release notes for the specified tag. This string can be used in subsequent steps to publish the release notes to a file, create a GitHub release, or send notifications.
7984

release_notes_generator/model/service_chapters.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,11 @@ def populate(self, records: dict[int | str, Record]) -> None:
105105
if record.skip:
106106
continue
107107

108-
# skip the record when used in used and not allowed to be duplicated in Service chapters
108+
# skip the record when already used and not allowed to be duplicated in Service chapters
109109
if self.__is_row_present(record_id) and not self.duplicity_allowed():
110110
continue
111111

112+
# main three situations:
112113
if record.is_closed and isinstance(record, IssueRecord):
113114
self.__populate_closed_issues(cast(IssueRecord, record), record_id)
114115

@@ -118,12 +119,14 @@ def populate(self, records: dict[int | str, Record]) -> None:
118119
elif isinstance(record, CommitRecord):
119120
self.__populate_direct_commit(cast(CommitRecord, record), record_id)
120121

122+
# other edge case situations
121123
else:
122124
if (
123125
record.is_open
124126
and isinstance(record, IssueRecord)
125127
and cast(IssueRecord, record).pull_requests_count() == 0
126128
):
129+
# no change increment delivered
127130
pass
128131
elif (
129132
record.is_open
@@ -164,7 +167,7 @@ def __populate_closed_issues(self, record: IssueRecord, record_id: int | str) ->
164167
populated = True
165168

166169
if pulls_count > 0:
167-
# the record looks to be valid closed issue with 1+ pull requests
170+
# the record looks to be valid closed issue with 1+ pull requests, no reason to report it
168171
return
169172

170173
if not populated:

0 commit comments

Comments
 (0)