Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request: Configurable prefix before conventional commit title #258

Closed
1 task done
spydon opened this issue Mar 7, 2022 · 4 comments · Fixed by #259
Closed
1 task done

request: Configurable prefix before conventional commit title #258

spydon opened this issue Mar 7, 2022 · 4 comments · Fixed by #259

Comments

@spydon
Copy link
Collaborator

spydon commented Mar 7, 2022

Is there an existing feature request for this?

  • I have searched the existing issues.

Command

No response

Description

In some collaborative version control services, like Azure DevOps, they add an annoying non-configurable prefix to each merged pull requests commit message.

For example: Merged PR 404: fix: Use correct path for signing

This feature would implement so that it is possible to ignore that prefix, maybe with a regex, to be able to version melos projects that are hosted by services with these prefixes properly.

Reasoning

It would be useful since it would be possible to use Melos in services that are using these kind of prefixes.

Additional context and comments

Feature request for Azure Devops

@spydon spydon added feature request Needs: Triage The issue needs triaging labels Mar 7, 2022
@spydon
Copy link
Collaborator Author

spydon commented Mar 7, 2022

@Salakar could I work on a PR for this?
If that is the case, could you give some pointers to how you'd want it implemented? 🙂

@Salakar
Copy link
Contributor

Salakar commented Mar 7, 2022

@Salakar could I work on a PR for this? If that is the case, could you give some pointers to how you'd want it implemented? 🙂

Of course! Best place to start would be the conventional commits package: https://github.com/invertase/melos/tree/main/packages/conventional_commit - if the goal is to just ignore the prefix then it should be pretty straightforward modifying the regex to handle it. If it needs to be configureable then could probably add it as a optional named arg to tryParse: https://github.com/invertase/melos/blob/main/packages/conventional_commit/lib/conventional_commit.dart#L75 . Package has pretty good test coverage so should be hard to break things without it being detected.

@Salakar
Copy link
Contributor

Salakar commented Mar 7, 2022

I mean technically removing the ^ from the start of the regex also solves this problem :D https://github.com/invertase/melos/blob/main/packages/conventional_commit/lib/conventional_commit.dart#L19

@spydon
Copy link
Collaborator Author

spydon commented Mar 7, 2022

I mean technically removing the ^ from the start of the regex also solves this problem :D https://github.com/invertase/melos/blob/main/packages/conventional_commit/lib/conventional_commit.dart#L19

Hahah here I was imagining a few hours of work at least. 😅
That sounds like a good solution to me at least!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants