Some changelogers were always returning the short sha instead of the
full one, so setting an abbrev had no effect.
This fixes these changelogers, which should now always return the full
sha.
Note that github usually still shortens the SHAs rendered in markdown,
so the changes might not even be visible in most cases.
closes#4829
<!--
Hi, thanks for contributing!
Please make sure you read our CONTRIBUTING guide.
Also, add tests and the respective documentation changes as well.
-->
<!-- If applied, this commit will... -->
...
<!-- Why is this change being made? -->
...
<!-- # Provide links to any relevant tickets, URLs or other resources
-->
...
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This allows to use templates for commit messages in the changelog when
using `github`, `gitea`, or `gitlab` as the changelog implementation.
closes#4800
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
- Add `strings` package import to `gitea.go`
- Implement `Changelog` function in `gitea.go`
- Update `useGitea` constant in `changelog.go`
- Add test for `useGitea` in `changelog_test.go`
- Update `changelog.md` with information about `gitea` customization
ref:
* Server API: https://github.com/go-gitea/gitea/pull/30349
* SDK: https://gitea.com/gitea/go-sdk/pulls/659
---------
Signed-off-by: appleboy <appleboy.tw@gmail.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
closes#3485
also fixed a bug in file creation for github: it was always searching
for the file in the default branch
also, we don't need to create the file first, update does both create
and update.
TODO: implement the for krew, scoop, etc...
---------
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
alternative to #3806
the idea is that both `context.New` and `context.Context{}` are never
used in tests.
not sure yet how much I like it, so far code does look a bit more
readable though.
---------
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Fix the regular expressions used in changelog group processing to valid
golang (RE2) regexps. These previously used PCRE character class `\w`
which is not supported in RE2 which is what golang regexp uses.
Also document that format matches not just title as some may thing but
the format `<abbrev-commit> <title-commit>`.
this allows the user to specify the abbrev lenght to use, and will also add the option to omit the commit hash altogether by setting it to -1.
default is doing nothing
closes#3348
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This changes the changelog grouping feature a bit: it evaluates the
groups in the order they are declared in the config file, but renders
them following their `order` attribute.
This allows to have better filters, for instance, you might want to have
dependabot commits in another section, which does not need a high
priority in the changelog output, but does when evaluating, as it might
share the words with other groups: in goreleaser's case, the `feat`
prefix.
Giving that Go's regex seems to don't allow negative look-aheads (which
would help in this particular case), this seems like a good quality of
life improvement.
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: replacing logs
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: tests et al
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: update termenv/lipgloss
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* wip: output
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: pin dep
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: update
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: tests
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: tests
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: deps
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: dep
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
basically allows to use goreleaser against a repo with a git url without both owner and repo name.
closes#3060closes#3058
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: make --release-notes flags more deterministic
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* chore: fmt
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: do not filter and sort github-native
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: improve code a bit
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: improve code a bit
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: changelog header
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
The Github changelog generation API returns a pre-formatted changelog. The
current implementation prefixes every line of that log with "* ". This operation
breaks the formatting.
This change makes goreleaser treat github-native changelog as-is, without
trying to modify it.
* feat: expose .PreviousTag
* fix: previous tag will never be a commit
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* docs: tag
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: changelog from github
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: unifying client mocks
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: unifying client mocks
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: mocks
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: added tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: remove unused code
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: added more
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: testdata
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: fmt
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: fix
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: fix
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* docs: improve docs
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: improve middleware
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: upload tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: twitter tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: source tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: snapshot tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: improved some tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: snapcraft skip
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip slack
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip sign
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip scoop
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip reddit
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip discord
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip publish
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip nfpm
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip milestone
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip custompublishers
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip checksums
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip changelog
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip brew
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip blob
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip before
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip artifactory
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip announce
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip defaults
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: cmds
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip docker
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* chore: todo
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: go.mod
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip release
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: remove old skip pipe errors
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip teams
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip brew
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix/test: skip smtp
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: lint issues
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip docker
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip brew and scoop
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip docker
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip http/artifactory
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: increase coverage
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fix
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>