Giter Site home page Giter Site logo

Comments (4)

codejedi365 avatar codejedi365 commented on July 18, 2024

@ttimbers, thank you for reporting this. Ends up our regular expression was not considering Windows based commit messages which would have \r\n rather than just \n. If you are writing the commit message manually, I recommend using the bang (!) character in the subject line to indicate your breaking changes for the time being.

feat!: testing major release

Just an edit to the authors really.

BREAKING CHANGE: Added middle initial

You also might be able to set .gitattributes at the top level of your repository and force git to always use Unix line endings LF but I'm not sure if this applies to the commit messages rather than the files. Luckily, Git on Windows will make the transition seamless to you (converts to CRLF upon checkout but saves as LF).

from python-semantic-release.

ttimbers avatar ttimbers commented on July 18, 2024

@codejedi365 - thanks so much for the prompt response to the issue!

Adding a ! to the scope in the header did in fact work! See here: https://github.com/ttimbers/pycounts_tt_2024/actions/runs/7714526673

Interestingly, I am not using Windows, at least no knowingly... To test out these commits with PSR I was using the GitHub web application pen tool to edit the README and then commit the changes, and then the PSR action was being run using an Ubuntu runner. Maybe the GitHub web application pen tool is using Windows? I had never considered that before!

A follow-up questions, the use of ! with PSR's default parser is not included in your documentation (at least that I can find), would you welcome a PR to add this? I think this is important because it's also not in the angular docs, which PSR references.

Thanks again for the quick help!

from python-semantic-release.

codejedi365 avatar codejedi365 commented on July 18, 2024

Maybe the GitHub web application pen tool is using Windows?

@ttimbers That's quite possible that the web interface is written towards windows. I found it odd that your commit message had \n\n between the subject and the body and then the body paragraphs used \r\n as the new line separators. Likely a translation error from the html text area element to form data.

A follow-up questions, the use of ! with PSR's default parser is not included in your documentation (at least that I can find), would you welcome a PR to add this? I think this is important because it's also not in the angular docs, which PSR references.

As I'm only a contributor myself, I don't have much sway in if the PR is accepted or not so PRs are always welcome.

My thoughts on the matter though would be that we should probably deviate from the term angular style in PSR because the angular format transformed into a larger movement that defines the conventional commits specification. The conventional commits specification is where ! is documented and it is defined as an optional syntax for breaking changes. Personally, I would put more emphasis on redirecting people to the specification that we implement rather than redefine and maintain the same docs to document the specification that is out in the world and being maintained by version separately.

from python-semantic-release.

bernardcooke53 avatar bernardcooke53 commented on July 18, 2024

I think @codejedi365 has explained this pretty well - pretty sure the GitHub UI defaults to \r\n separators. #821 is going to get merged and then this shouldn't be an issue.

You also might be able to set .gitattributes at the top level of your repository and force git to always use Unix line endings LF but I'm not sure if this applies to the commit messages rather than the files. Luckily, Git on Windows will make the transition seamless to you (converts to CRLF upon checkout but saves as LF).

I also wanted to echo this - https://git-scm.com/docs/gitattributes#_eol should hopefully mitigate some of the inconsistencies, but it doesn't seem to apply to commits. It can however help make CHANGELOG entries consistent when you may have contributors working on multiple platforms.

If you want to ensure that text files that any contributor introduces to the repository have their line endings normalized, you can set the text attribute to "auto" for all files.

*	text=auto

from python-semantic-release.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.