mathieudutour / mathieudutour/github-tag-action

Bug: Unable to retrieve commits history when using Squash and Merge on Pull requests

Open
#189 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
733
Forks
227
PR merge metrics
No merged PRs in 30d

Description

This is the action I used in my workflow file:

```
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: false
create_annotated_tag: true
```

This is a sample PR commit that is squashed and merged from my `dev` branch into the `main` branch:

```text
feat(api): add historical query (#40)
* feat(api): add historical query in api (#50)

Co-authored-by: =person_1 <=person_1@live.com>

* fix(api): remove buggy api

* refractor(api): change data structure

* build: update query dashboard

---------

Co-authored-by: =person_1 <=person_1@live.com>

* test: add new integration tests (#45)

The following integration tests are added:
1. test 1
2. test 2

The following changes are made:
1. Rename integration test test script name
2. Solve bugs in function A
3. Solve bugs in function B

* build(tests): add pytest in requirements.txt (#48)

* build: update dashboard (#49)

* fix(api):dashboard query -history features

* fix: test script

* refractor(api): change data structure of response

* fix: test script

* fix: api logic

* build: update dashboard

---------

Co-authored-by: =person_1 <=person_1@live.com>

---------

Co-authored-by: person_1 <123456789+person_1@users.noreply.github.com>
Co-authored-by: =person_1 <=person_1@apecia.com>
Co-authored-by: person_2 <123456789+person_2@users.noreply.github.com>
```

This is the logs I get from my workflow run:

```
2023-09-11T07:25:48.7952138Z ##[group]Run mathieudutour/github-tag-action@v6.1
2023-09-11T07:25:48.7952450Z with:
2023-09-11T07:25:48.7953107Z github_token: ***
2023-09-11T07:25:48.7953351Z default_bump: false
2023-09-11T07:25:48.7953600Z create_annotated_tag: true
2023-09-11T07:25:48.7953869Z default_prerelease_bump: prerelease
2023-09-11T07:25:48.7954130Z tag_prefix: v
2023-09-11T07:25:48.7954372Z release_branches: master,main
2023-09-11T07:25:48.7954611Z fetch_all_tags: false
2023-09-11T07:25:48.7954834Z dry_run: false
.......
2023-09-11T07:25:48.7958084Z ##[endgroup]
2023-09-11T07:25:49.2332088Z Previous tag was v0.0.0, previous version was 0.0.0.
2023-09-11T07:25:49.4388253Z Analysis of 0 commits complete: no release
```

So far I've squashed and merged two PR's from the `dev` branch to my `main` branch and both of the PR's do not create any tag or release.

I've checked my `main` branch commits history and there are more than 60 commits but the logs always shows `Analysis of 0 commits complete: no release`.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the workflow configuration and the action run logs shown in the issue, then trace how github-tag-action determines the commits to analyze after a squash-and-merge. Reproduce the reported history with the provided settings and verify that the action analyzes the merged changes and creates the expected tag or release.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github-actions, typescript
Domain
ci-cd, release
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.