Skip to content

Commit

Permalink
chore: Remove statistics from generated release notes
Browse files Browse the repository at this point in the history
Since some months ago we don't publish anymore the statistics and only
the changelog for each released component.

Signed-off-by: Lluis Campos <[email protected]>
  • Loading branch information
lluiscampos committed Dec 4, 2024
1 parent facbec2 commit 2415fb2
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 158 deletions.
15 changes: 4 additions & 11 deletions extra/release_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2503,10 +2503,10 @@ def determine_version_to_include_in_release(state, repo):
return True


def run_and_combine_statistics_and_changelog(
def generate_release_changelog(
workdir, single_repo, from_version, to_version, output_file
):
"""Generate statistics and changelogs and combine them in a single file"""
"""Generate changelog and write it to a file"""

release_date = execute_git(
None,
Expand Down Expand Up @@ -2539,20 +2539,15 @@ def run_and_combine_statistics_and_changelog(
changelog_tool = os.path.join(
integration_dir(), "extra/changelog-generator/changelog-generator"
)
statistics_tool = os.path.join(integration_dir(), "extra/statistics-generator")

def log_and_run_cmd(cmd, workdir):
print("Running in workdir %s command: %s" % (workdir, " ".join(cmd)))
return subprocess.check_output(cmd, cwd=workdir)

changelog_out = log_and_run_cmd([changelog_tool] + command_args, workdir)
statistics_out = log_and_run_cmd([statistics_tool] + command_args, workdir)

print("Writing Release Notes for %s in %s" % (release_name, output_file))
with open(output_file, "w") as fd:
fd.write(release_header)
fd.write(statistics_out.decode())
fd.write("\n")
fd.write(changelog_out.decode())


Expand All @@ -2577,7 +2572,7 @@ def do_generate_release_notes(
prev_of_integration = find_prev_version(tag_list, version_of_integration)

# Release notes for Mender (server)
run_and_combine_statistics_and_changelog(
generate_release_changelog(
base_dir,
False,
prev_of_integration,
Expand All @@ -2603,9 +2598,7 @@ def do_generate_release_notes(
)
workdir = os.path.join(base_dir, repo.git())
output_file = "release_notes_%s.txt" % repo.git()
run_and_combine_statistics_and_changelog(
workdir, True, prev_version, version, output_file
)
generate_release_changelog(workdir, True, prev_version, version, output_file)


def do_release(release_state_file, args):
Expand Down
28 changes: 0 additions & 28 deletions extra/test/release_notes_mender-artifact.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,6 @@

_Released 09.28.2021_

### Statistics

A total of 38 lines added, 7 removed (delta 31)

| Developers with the most changesets | |
|---|---|
| Lluis Campos | 3 (60.0%) |
| Ole Petter Orhagen | 1 (20.0%) |
| Kristian Amlie | 1 (20.0%) |

| Developers with the most changed lines | |
|---|---|
| Lluis Campos | 28 (73.7%) |
| Ole Petter Orhagen | 8 (21.1%) |
| Kristian Amlie | 2 (5.3%) |

| Top changeset contributors by employer | |
|---|---|
| Northern.tech | 5 (100.0%) |

| Top lines changed by employer | |
|---|---|
| Northern.tech | 38 (100.0%) |

| Employers with the most hackers (total 3) | |
|---|---|
| Northern.tech | 3 (100.0%) |

### Changelogs

#### mender-artifact (3.6.1)
Expand Down
4 changes: 0 additions & 4 deletions extra/test/release_notes_mender-cli.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@

_Released 04.16.2021_

### Statistics

A total of 0 lines added, 0 removed (delta 0)

### Changelogs

4 changes: 0 additions & 4 deletions extra/test/release_notes_mender-connect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@

_Released 07.13.2021_

### Statistics

A total of 0 lines added, 0 removed (delta 0)

### Changelogs

58 changes: 0 additions & 58 deletions extra/test/release_notes_mender.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,6 @@

_Released 09.28.2021_

### Statistics

A total of 588 lines added, 396 removed (delta 192)

| Developers with the most changesets | |
|---|---|
| Kristian Amlie | 11 (36.7%) |
| Lluis Campos | 5 (16.7%) |
| Alf-Rune Siqveland | 3 (10.0%) |
| Ole Petter Orhagen | 3 (10.0%) |
| Fabio Tranchitella | 2 (6.7%) |
| Uri Ishon | 2 (6.7%) |
| Prashanth Joseph Babu | 2 (6.7%) |
| Alan Martinovic | 1 (3.3%) |
| Manuel Zedel | 1 (3.3%) |

| Developers with the most changed lines | |
|---|---|
| Kristian Amlie | 414 (58.5%) |
| Ole Petter Orhagen | 117 (16.5%) |
| Lluis Campos | 58 (8.2%) |
| Prashanth Joseph Babu | 46 (6.5%) |
| Uri Ishon | 31 (4.4%) |
| Alf-Rune Siqveland | 24 (3.4%) |
| Alan Martinovic | 13 (1.8%) |
| Fabio Tranchitella | 4 (0.6%) |
| Manuel Zedel | 1 (0.1%) |

| Developers with the most lines removed | |
|---|---|
| Lluis Campos | 32 (8.1%) |

| Developers with the most signoffs (total 1) | |
|---|---|
| Kristian Amlie | 1 (100.0%) |

| Top changeset contributors by employer | |
|---|---|
| Northern.tech | 26 (86.7%) |
| Complete Solution Robotics, LLC | 2 (6.7%) |
| [email protected] | 2 (6.7%) |

| Top lines changed by employer | |
|---|---|
| Northern.tech | 631 (89.1%) |
| [email protected] | 46 (6.5%) |
| Complete Solution Robotics, LLC | 31 (4.4%) |

| Employers with the most signoffs (total 1) | |
|---|---|
| Northern.tech | 1 (100.0%) |

| Employers with the most hackers (total 9) | |
|---|---|
| Northern.tech | 7 (77.8%) |
| [email protected] | 1 (11.1%) |
| Complete Solution Robotics, LLC | 1 (11.1%) |

### Changelogs

#### mender (3.1.0)
Expand Down
53 changes: 0 additions & 53 deletions extra/test/release_notes_server.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,6 @@

_Released 09.28.2021_

### Statistics

A total of 10247 lines added, 5174 removed (delta 5073)

| Developers with the most changesets | |
|---|---|
| Manuel Zedel | 123 (63.1%) |
| Fabio Tranchitella | 40 (20.5%) |
| Alf-Rune Siqveland | 9 (4.6%) |
| Lluis Campos | 8 (4.1%) |
| Alex Miliukov | 6 (3.1%) |
| Krzysztof Jaskiewicz | 3 (1.5%) |
| Marcin Chalczynski | 2 (1.0%) |
| Prashanth Joseph Babu | 1 (0.5%) |
| Kristian Amlie | 1 (0.5%) |
| Michael Clelland | 1 (0.5%) |

| Developers with the most changed lines | |
|---|---|
| Manuel Zedel | 5132 (45.2%) |
| Fabio Tranchitella | 2224 (19.6%) |
| Alf-Rune Siqveland | 1592 (14.0%) |
| Alex Miliukov | 1333 (11.7%) |
| Krzysztof Jaskiewicz | 721 (6.3%) |
| Lluis Campos | 253 (2.2%) |
| Marcin Chalczynski | 61 (0.5%) |
| Michael Clelland | 25 (0.2%) |
| Peter Grzybowski | 12 (0.1%) |
| Prashanth Joseph Babu | 2 (0.0%) |

| Developers with the most lines removed | |
|---|---|
| Lluis Campos | 72 (1.4%) |
| Marcin Chalczynski | 13 (0.3%) |

| Top changeset contributors by employer | |
|---|---|
| Northern.tech | 189 (96.9%) |
| RnDity | 5 (2.6%) |
| [email protected] | 1 (0.5%) |

| Top lines changed by employer | |
|---|---|
| Northern.tech | 10572 (93.1%) |
| RnDity | 782 (6.9%) |
| [email protected] | 2 (0.0%) |

| Employers with the most hackers (total 11) | |
|---|---|
| Northern.tech | 8 (72.7%) |
| RnDity | 2 (18.2%) |
| [email protected] | 1 (9.1%) |

### Changelogs

#### deployments (4.0.0)
Expand Down

0 comments on commit 2415fb2

Please sign in to comment.