Commit graph

24 commits

Author SHA1 Message Date
11f8403241
fix: create CHANGELOG.md if it does not exist (#108)
During a previous refactoring (#15) the Changelog generation logic stopped creating the file if it did not exist. This makes sure that the file actually gets created. This is primarily required while onboarding new repositories.

Closes #85
2024-11-15 18:07:59 +01:00
0ae2d909bc
fix: use commits with slightly invalid messages in release notes (#105)
Fixes a bug where commits with messages that do not strictly conform to
conventional commits spec would be ignored. This could easily happen
while parsing footers like "Closes #xx" which would start the footer
section, while continuing with the body afterwards.

This solution has two downsides:

- these warnings are not surfaced to the user.
- If a `BREAKING CHANGE` footer exists after the parsing issue it is ignored

Co-authored-by: jo <ljonas@riseup.net>
2024-11-15 17:25:15 +01:00
renovate[bot]
faf28fd314
deps: update module github.com/google/go-github/v65 to v66 (#103)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-15 15:10:52 +01:00
3caa7364ee
fix(gitlab): release not created when release pr was squashed (#86)
When the release pull request was squashed on GitLab, the release
creation fails with error

    Error: failed to create pending releases: pull request is missing the merge commit

This fixes the problem by checking both `MergeCommitSHA` and
`SquashCommitSHA` and using whichever is set.
2024-10-17 17:22:03 +00:00
89dc9e3fe8
feat(gitlab): support self-managed instances (#75)
Support self-managed gitlab instances by reading the GitLab CI environment
variables.
2024-09-25 12:41:11 +02:00
2621c48d75
feat(changelog): omit version heading in forge release notes
The forge ui usually shows the release name right above the description,
so this removes an unecessary duplicate bit of information.

In addition this also cleans up the changelog interface a bit and moves
functionality where it belongs. Prepares a bit for custom changelogs in
the future.

Closes #32
2024-09-22 14:00:30 +02:00
renovate[bot]
937b885696
deps: update module github.com/google/go-github/v63 to v65 (#69)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-21 13:40:15 +02:00
ee83cec049
fix(gitlab): use project path wherever possible (#54)
Turns out that all we need is the path, and not the project id. The path
is way more user friendly, and we can easily get it from a CI variable
or combine it from the namespace & project name.
2024-09-08 21:07:03 +02:00
634eac3b76
fix(parser): invalid handling of empty lines (#53)
GitLab generates commit messages of the pattern "scope: message\n" if no
body is present. This throws up the conventional commits parser we use,
and results in the error message "missing a blank line".

We now `strings.TrimSpace()` the commit message to avoid this problem.
2024-09-08 21:05:18 +02:00
2fba5414e5
fix(gitlab): hardcoded project id (#51)
The GitLab project ID was still hardcoded to my playground project on
GitLab.com.

This commit instead reads from the predefined GitLab CI/CD variable for
the projects ID (`CI_PROJECT_ID`).
2024-09-08 20:03:19 +02:00
48d9ede0a2
feat: add support for GitLab repositories (#49) 2024-09-07 21:54:25 +02:00
5ea41654a7
fix(parser): continue on unparsable commit message (#48)
We should not fail the whole process if a single commit message is
unparsable.

Instead we now log the issue and ignore the commit.
2024-09-07 21:51:15 +02:00
2010ac1143
refactor(github): add pagination helper (#47) 2024-09-07 21:36:17 +02:00
af505c94c6
refactor: labels as structs with descriptions (#46) 2024-09-07 21:33:28 +02:00
b9dd0f986c
feat(cli): show release PR url in log messages (#44)
Makes navigating to the PR way easier when looking at the logs.

This requires a new `Forge.PullRequestURL()` method that needs to be
implemented for all forges.
2024-09-06 23:27:48 +02:00
2effe5e72d
feat: edit commit message after merging through PR (#43)
Closes #5
2024-09-06 23:17:06 +02:00
36a0b90bcd
refactor: releasepr markdown handling (#42) 2024-09-01 14:19:13 +02:00
0750bd6b46
feat: format markdown in changelog entry (#41) 2024-08-31 22:23:01 +02:00
4cb22eae10
refactor: replace markdown renderer (#40)
The new renderer is actually published as a module and can be extended
through the usual goldmark extensions.
2024-08-31 16:49:07 +02:00
a0a064d387
refactor: move things to packages (#39) 2024-08-31 15:23:21 +02:00
d5fd606577
chore: enable some more linters (#16) 2024-08-23 22:35:06 +02:00
0c93645b21 refactor: smaller fixes 2024-08-20 17:37:46 +02:00
fe871a0213 feat(releasepr): release PRs can be updated
- PR Description
- Read prefix+suffix from PR description and put into changelog
- Keep those overrides on PR description changes
- Add pending level to new PRs
2024-08-04 20:22:15 +02:00
74ea8fba17 chore: working releasable commits 2024-07-12 14:51:24 +02:00