Skip to content

Conversation

@mbarnett-jones-dare
Copy link

Problem

We use github-tag-action to generate semver versions and then release notes for a number of projects. We are also using it in a monorepo with 2 different apps and this is where we're running into issues. Because github_tag_action looks at all the commits since the last tag we end up with a bunch of unrelated changes being considered e.g.

feat: Update frontend
feat: Add new python library 

Where ideally we'd only have one bump per app.

Solution

This is quick illustrative PR to explain how I might use the github-tag-action with a mono repo. In this change I added a path based filter to the getCommits - it's not wired through to the config / params that mean people can use it but I wanted to share this approach early to get some feedback before going any further.

Thoughts, comments, criticisms welcome.

sha: '4567',
},
];
// @ts-ignore

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would tidy this up for a proper PR

findmyname666 added a commit to findmyname666/github-tag-action that referenced this pull request Aug 5, 2025
.filter((commit) =>
!targetPath
? true
: commit.files?.some((file) => file.filename?.includes(targetPath))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
: commit.files?.some((file) => file.filename?.includes(targetPath))
: commit.files?.some((file) => file.filename?.startsWith(targetPath))

I'm not maintainer but it seems to me that includes can create false positives when some sub-string is matched.

@findmyname666
Copy link

I created a new PR #236. It introduces working solution for commit filtering based on a path of changed files.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants