expo / expo/expo-github-action

Fingerprint always shows a diff on a branch based on another branch

Open
#339 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1k
Forks
107
PR merge metrics
No merged PRs in 30d

Description

### Description of the bug
When using `expo/expo-github-action/fingerprint`, the computed fingerprint is valid when a feature branch (`feature-a`) is based on main. However, when another feature branch (`feature-b`) is created from `feature-a`, there is always a diff because the previous fingerprint (from the last commit of `feature-a`) is empty.

### To Reproduce
1. Create a branch `feature-a` from main.
2. Run the `expo/expo-github-action/fingerprint` action on `feature-a` → The fingerprint is correctly computed.
3. Create a new branch `feature-b` from `feature-a`.
4. Run the `expo/expo-github-action/fingerprint` action on `feature-b`.
5. There is always a diff because the previous fingerprint (last commit of `feature-a`) is empty.

#### Expected behavior
The fingerprint comparison should properly account for feature branches based on other feature branches to avoid unnecessary diffs.

#### Actual behavior
The action detects a diff on `feature-b` because the previous fingerprint from `feature-a` is empty.

### Additional context
I manually downloaded the fingerprint database and noticed that it only contains commits from main.
This explains why the diff from `feature-a` to `feature-b` is incorrect: the commit from `feature-a` is not saved in the fingerprint database, leading to an empty previous fingerprint on `feature-b`.
It seems that fingerprints are only stored for commits on main, which causes issues when working with feature branches based on other feature branches.

Would love to get guidance on whether this is expected behavior or if there’s a way to ensure consistency across feature branches!

Thanks :)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.