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

Hard coded branch name for getting full git history results in broken action #229

Closed
TobiWo opened this issue Dec 23, 2022 · 8 comments
Closed

Comments

@TobiWo
Copy link

TobiWo commented Dec 23, 2022

Here you hard code master as branch to check for full history. However, if your main branch is called main or differently this will not work. You have multiple options:

  • add a new environment variable where the user set's the name of the main branch
  • maybe use the already present RELEASE_BRANCHES env variable but this is maybe a bit greedy ... I mean how to decided which is the main branch if multiple release branches are defined
  • or you extract the default branch (see here) assuming that this is the users main/master which should be the case

For reference: https://github.com/TobiWo/eth-duties/actions/runs/3765394398/jobs/6400825949#step:4:33

@sbe-arg
Copy link
Collaborator

sbe-arg commented Dec 25, 2022

Good point @sammcj mind opening a hotfix pr I'm on holidays without access to a laptop

Maybe we can set it to something like

${{ github.event.repository.default_branch }}

And apologies

@sbe-arg
Copy link
Collaborator

sbe-arg commented Dec 25, 2022

Oh wait I see what you mean this breaks the
Full history Line 130 master..HEAD

@sbe-arg
Copy link
Collaborator

sbe-arg commented Dec 25, 2022

Did this over the phone needs testing before merging

#230

@sbe-arg
Copy link
Collaborator

sbe-arg commented Jan 2, 2023

hotfix merged @TobiWo can you test 1.56 and re-open if the problem persists

@sbe-arg sbe-arg closed this as completed Jan 2, 2023
@TobiWo
Copy link
Author

TobiWo commented Jan 3, 2023

I will test it. Thanks.

@TobiWo
Copy link
Author

TobiWo commented Jan 4, 2023

hotfix merged @TobiWo can you test 1.56 and re-open if the problem persists

Hi @sbe-arg, I tested the new release but still have some issues.

  1. If I rebase and merge the action doesn't recognize any commit with BRANCH_HISTORY: full (see here)
  2. If I rebase and merge everything works as expected with BRANCH_HISTORY: last (see here)
  3. If I use a regular merge commit I receive a similar error as before the fix (see here)

I'm not able to re-open the issue (maybe I don't see how or I don't have permissions). In any way this needs some fix.
It would be nice if the full commit history can be considered also on rebase and merge. I like to use the rebase approach and I always need to check the last commit message for the respective keyword currently which is a bit cumbersome.

P.S.: I'm not able to re-open because you closed it 😉

@sbe-arg sbe-arg reopened this Jan 6, 2023
@sbe-arg
Copy link
Collaborator

sbe-arg commented Jan 6, 2023

Reopened for tracking...

Its been looked in combination to fixing the history and default branch setting.

They both depend on each other depending the type of history and the alpine container has no head but workarounds are comming.

@sbe-arg
Copy link
Collaborator

sbe-arg commented Jan 6, 2023

Tracking in #243

@sbe-arg sbe-arg closed this as completed Jan 8, 2023
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

No branches or pull requests

2 participants