Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

[automatic-releases] Do not drop commits without known type #27

Merged
merged 1 commit into from
Jun 2, 2020

Conversation

hwoarang
Copy link
Contributor

Projects may have different conventions that those mandated by the
conventional-commits-parser[1] package. For example, it is customary
to also prefix commits depending on the area of change such as

src: fix foobar
tests: Fix another test

All these commits, when they are parsed, they end up with type == "src"
or type == "tests" and the package was dropping them silently because
they did not have a known type. However, we shouldn't do that but we
should let projects be flexible on how they use their commit messages
and simply list them along with those of type == null if they do not have a
known type.

[1] https://www.npmjs.com/package/conventional-commits-parser

@hwoarang hwoarang force-pushed the allow-unknown-keys branch 2 times, most recently from e9673fd to 9fb95b0 Compare May 29, 2020 13:09
@marvinpinto
Copy link
Owner

I think I kind of understand the problem you're trying to solve and it will make more sense if I can see examples.

Could you add some tests (with examples) of commit messages? (this will also help with preventing regressions).

Projects may have different conventions that those mandated by the
conventional-commits-parser[1] package. For example, it is customary
to also prefix commits depending on the area of change such as

src: fix foobar
tests: Fix another test

All these commits, when they are parsed, they end up with type == "src"
or type == "tests" and the package was dropping them silently because
they did not have a known type. However, we shouldn't do that but we
should let projects be flexible on how they use their commit messages
and simply list them along with those of type == null if they do not have a
known type.

[1] https://www.npmjs.com/package/conventional-commits-parser
@hwoarang
Copy link
Contributor Author

hwoarang commented Jun 2, 2020

I think I kind of understand the problem you're trying to solve and it will make more sense if I can see examples.

Could you add some tests (with examples) of commit messages? (this will also help with preventing regressions).

@marvinpinto I have extended the non-conformant test case with an additional commit which tests the case I am looking for. I have added this custom commit by simply copying the existing one and changing the sha and commit message. I hope that's fine. But if you have a designated way to add mock commits I am happy to redo that.

@marvinpinto
Copy link
Owner

The test you added looks good, thank you @hwoarang 👍

@marvinpinto marvinpinto merged commit f2df8d9 into marvinpinto:master Jun 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants