Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions actions/release_setup/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,12 @@ def process_release_body(release_body: str) -> str:
"""
processed_body = ''
contributors = {}
in_new_contributors = False

for line in io.StringIO(release_body).readlines():
processed_line = _process_line_for_contributors(line, contributors)
if line.strip() == '## New Contributors':
in_new_contributors = True
processed_line = _process_line_for_contributors(line, contributors, track=not in_new_contributors)
processed_body += processed_line

# add contributors to the release notes
Expand All @@ -299,7 +302,7 @@ def process_release_body(release_body: str) -> str:
return processed_body


def _process_line_for_contributors(line: str, contributors: dict) -> str:
def _process_line_for_contributors(line: str, contributors: dict, track: bool = True) -> str:
"""
Process a single line to replace mentions and track contributors.

Expand All @@ -309,6 +312,8 @@ def _process_line_for_contributors(line: str, contributors: dict) -> str:
The line to process.
contributors : dict
Dictionary to track contributor information.
track : bool
Whether to count this line toward the contributor's contribution count.

Returns
-------
Expand All @@ -324,7 +329,8 @@ def _process_line_for_contributors(line: str, contributors: dict) -> str:
return line

username = username_search.group(1)
_track_contributor(username, contributors)
if track:
_track_contributor(username, contributors)

return _replace_mentions_and_pr_urls(line, username)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@

---
## Contributors
<a href="https://github.com/ReenigneArcher" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, ReenigneArcher" ><img src="https://github.com/ReenigneArcher.png?size=40" width="40" height="40" alt="ReenigneArcher" title="ReenigneArcher: 59 merges" ></a><a href="https://github.com/dependabot" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, dependabot" ><img src="https://github.com/dependabot.png?size=40" width="40" height="40" alt="dependabot" title="dependabot: 41 merges" ></a><a href="https://github.com/Hazer" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, Hazer" ><img src="https://github.com/Hazer.png?size=40" width="40" height="40" alt="Hazer" title="Hazer: 6 merges" ></a><a href="https://github.com/LizardByte-bot" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, LizardByte-bot" ><img src="https://github.com/LizardByte-bot.png?size=40" width="40" height="40" alt="LizardByte-bot" title="LizardByte-bot: 5 merges" ></a><a href="https://github.com/gschintgen" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, gschintgen" ><img src="https://github.com/gschintgen.png?size=40" width="40" height="40" alt="gschintgen" title="gschintgen: 4 merges" ></a><a href="https://github.com/TimmyOVO" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, TimmyOVO" ><img src="https://github.com/TimmyOVO.png?size=40" width="40" height="40" alt="TimmyOVO" title="TimmyOVO: 3 merges" ></a><a href="https://github.com/tez011" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, tez011" ><img src="https://github.com/tez011.png?size=40" width="40" height="40" alt="tez011" title="tez011: 3 merges" ></a><a href="https://github.com/BeeLeDev" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, BeeLeDev" ><img src="https://github.com/BeeLeDev.png?size=40" width="40" height="40" alt="BeeLeDev" title="BeeLeDev: 2 merges" ></a><a href="https://github.com/c3m3gyanesh" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, c3m3gyanesh" ><img src="https://github.com/c3m3gyanesh.png?size=40" width="40" height="40" alt="c3m3gyanesh" title="c3m3gyanesh: 2 merges" ></a><a href="https://github.com/cathyjf" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, cathyjf" ><img src="https://github.com/cathyjf.png?size=40" width="40" height="40" alt="cathyjf" title="cathyjf: 2 merges" ></a><a href="https://github.com/cfalas" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, cfalas" ><img src="https://github.com/cfalas.png?size=40" width="40" height="40" alt="cfalas" title="cfalas: 2 merges" ></a><a href="https://github.com/cgarst" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, cgarst" ><img src="https://github.com/cgarst.png?size=40" width="40" height="40" alt="cgarst" title="cgarst: 2 merges" ></a><a href="https://github.com/cgutman" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, cgutman" ><img src="https://github.com/cgutman.png?size=40" width="40" height="40" alt="cgutman" title="cgutman: 2 merges" ></a><a href="https://github.com/chewi" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, chewi" ><img src="https://github.com/chewi.png?size=40" width="40" height="40" alt="chewi" title="chewi: 2 merges" ></a><a href="https://github.com/hgaiser" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, hgaiser" ><img src="https://github.com/hgaiser.png?size=40" width="40" height="40" alt="hgaiser" title="hgaiser: 2 merges" ></a><a href="https://github.com/ns6089" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, ns6089" ><img src="https://github.com/ns6089.png?size=40" width="40" height="40" alt="ns6089" title="ns6089: 2 merges" ></a><a href="https://github.com/skryvel" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, skryvel" ><img src="https://github.com/skryvel.png?size=40" width="40" height="40" alt="skryvel" title="skryvel: 2 merges" ></a><a href="https://github.com/xanderfrangos" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, xanderfrangos" ><img src="https://github.com/xanderfrangos.png?size=40" width="40" height="40" alt="xanderfrangos" title="xanderfrangos: 2 merges" ></a><a href="https://github.com/ABeltramo" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, ABeltramo" ><img src="https://github.com/ABeltramo.png?size=40" width="40" height="40" alt="ABeltramo" title="ABeltramo: 1 merge" ></a><a href="https://github.com/mariotaku" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, mariotaku" ><img src="https://github.com/mariotaku.png?size=40" width="40" height="40" alt="mariotaku" title="mariotaku: 1 merge" ></a>
<a href="https://github.com/ReenigneArcher" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, ReenigneArcher" ><img src="https://github.com/ReenigneArcher.png?size=40" width="40" height="40" alt="ReenigneArcher" title="ReenigneArcher: 59 merges" ></a><a href="https://github.com/dependabot" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, dependabot" ><img src="https://github.com/dependabot.png?size=40" width="40" height="40" alt="dependabot" title="dependabot: 41 merges" ></a><a href="https://github.com/Hazer" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, Hazer" ><img src="https://github.com/Hazer.png?size=40" width="40" height="40" alt="Hazer" title="Hazer: 6 merges" ></a><a href="https://github.com/LizardByte-bot" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, LizardByte-bot" ><img src="https://github.com/LizardByte-bot.png?size=40" width="40" height="40" alt="LizardByte-bot" title="LizardByte-bot: 5 merges" ></a><a href="https://github.com/gschintgen" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, gschintgen" ><img src="https://github.com/gschintgen.png?size=40" width="40" height="40" alt="gschintgen" title="gschintgen: 4 merges" ></a><a href="https://github.com/tez011" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, tez011" ><img src="https://github.com/tez011.png?size=40" width="40" height="40" alt="tez011" title="tez011: 3 merges" ></a><a href="https://github.com/TimmyOVO" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, TimmyOVO" ><img src="https://github.com/TimmyOVO.png?size=40" width="40" height="40" alt="TimmyOVO" title="TimmyOVO: 2 merges" ></a><a href="https://github.com/cgutman" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, cgutman" ><img src="https://github.com/cgutman.png?size=40" width="40" height="40" alt="cgutman" title="cgutman: 2 merges" ></a><a href="https://github.com/chewi" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, chewi" ><img src="https://github.com/chewi.png?size=40" width="40" height="40" alt="chewi" title="chewi: 2 merges" ></a><a href="https://github.com/ns6089" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, ns6089" ><img src="https://github.com/ns6089.png?size=40" width="40" height="40" alt="ns6089" title="ns6089: 2 merges" ></a><a href="https://github.com/ABeltramo" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, ABeltramo" ><img src="https://github.com/ABeltramo.png?size=40" width="40" height="40" alt="ABeltramo" title="ABeltramo: 1 merge" ></a><a href="https://github.com/BeeLeDev" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, BeeLeDev" ><img src="https://github.com/BeeLeDev.png?size=40" width="40" height="40" alt="BeeLeDev" title="BeeLeDev: 1 merge" ></a><a href="https://github.com/c3m3gyanesh" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, c3m3gyanesh" ><img src="https://github.com/c3m3gyanesh.png?size=40" width="40" height="40" alt="c3m3gyanesh" title="c3m3gyanesh: 1 merge" ></a><a href="https://github.com/cathyjf" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, cathyjf" ><img src="https://github.com/cathyjf.png?size=40" width="40" height="40" alt="cathyjf" title="cathyjf: 1 merge" ></a><a href="https://github.com/cfalas" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, cfalas" ><img src="https://github.com/cfalas.png?size=40" width="40" height="40" alt="cfalas" title="cfalas: 1 merge" ></a><a href="https://github.com/cgarst" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, cgarst" ><img src="https://github.com/cgarst.png?size=40" width="40" height="40" alt="cgarst" title="cgarst: 1 merge" ></a><a href="https://github.com/hgaiser" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, hgaiser" ><img src="https://github.com/hgaiser.png?size=40" width="40" height="40" alt="hgaiser" title="hgaiser: 1 merge" ></a><a href="https://github.com/mariotaku" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, mariotaku" ><img src="https://github.com/mariotaku.png?size=40" width="40" height="40" alt="mariotaku" title="mariotaku: 1 merge" ></a><a href="https://github.com/skryvel" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, skryvel" ><img src="https://github.com/skryvel.png?size=40" width="40" height="40" alt="skryvel" title="skryvel: 1 merge" ></a><a href="https://github.com/xanderfrangos" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, xanderfrangos" ><img src="https://github.com/xanderfrangos.png?size=40" width="40" height="40" alt="xanderfrangos" title="xanderfrangos: 1 merge" ></a>
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

---
## Contributors
<a href="https://github.com/LizardByte" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, LizardByte" ><img src="https://github.com/LizardByte.png?size=40" width="40" height="40" alt="LizardByte" title="LizardByte: 2 merges" ></a><a href="https://github.com/dependabot" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, dependabot" ><img src="https://github.com/dependabot.png?size=40" width="40" height="40" alt="dependabot" title="dependabot: 1 merge" ></a>
<a href="https://github.com/LizardByte" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, LizardByte" ><img src="https://github.com/LizardByte.png?size=40" width="40" height="40" alt="LizardByte" title="LizardByte: 1 merge" ></a><a href="https://github.com/dependabot" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, dependabot" ><img src="https://github.com/dependabot.png?size=40" width="40" height="40" alt="dependabot" title="dependabot: 1 merge" ></a>
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@

---
## Contributors
<a href="https://github.com/apps/renovate" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, renovate[bot]" ><img src="https://avatars.githubusercontent.com/in/2740?size=40" width="40" height="40" alt="renovate[bot]" title="renovate[bot]: 2 merges" ></a><a href="https://github.com/ReenigneArcher" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, ReenigneArcher" ><img src="https://github.com/ReenigneArcher.png?size=40" width="40" height="40" alt="ReenigneArcher" title="ReenigneArcher: 1 merge" ></a>
<a href="https://github.com/ReenigneArcher" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, ReenigneArcher" ><img src="https://github.com/ReenigneArcher.png?size=40" width="40" height="40" alt="ReenigneArcher" title="ReenigneArcher: 1 merge" ></a><a href="https://github.com/apps/renovate" target="_blank" rel="external noopener noreferrer" aria-label="GitHub profile of contributor, renovate[bot]" ><img src="https://avatars.githubusercontent.com/in/2740?size=40" width="40" height="40" alt="renovate[bot]" title="renovate[bot]: 1 merge" ></a>
Loading