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

chore: branch is available when event is workflow_dispatch #137

Merged
merged 1 commit into from
May 22, 2024

Conversation

Tirke
Copy link
Contributor

@Tirke Tirke commented Dec 18, 2023

I'm not entirely sure why you don't always set the branch, especially since the branch can be overridden by the inputs to be always available, meaning the branch would always be set no matter the github event.

But I wanted to play it safe so I only added an exception for workflow_dispatch which always runs against a branch and we should always consider the branch in that case because otherwise we would pick from ci runs from all branches which is really bad.

@TonyWhiteSMS
Copy link

I have had to make this change as well, as we do on demand deployments. Also we have multiple branches so found if a branch was not deployed from that workflow recently it was failing to find the last successful commit from a few days prior.

@Tirke Tirke changed the title chore: branch is available when even is workflow_dispatch chore: branch is available when event is workflow_dispatch Jan 23, 2024
@TonyWhiteSMS
Copy link

I suspect a tweak might be required for findExistingCommit as well, got a branch that has not been run for 2months but has a heap of changes merged from another branch and seems it fails to find the commit to use.

@TonyWhiteSMS
Copy link

FYI - this is my hardcoded solution for allowing more than 100 commits
#144

@mandarini mandarini self-assigned this May 22, 2024
@mandarini
Copy link
Member

Thank you for the PR @Tirke ! I think this change makes sense because it ensures that the branch is set correctly for workflow_dispatch events, preventing potential issues with picking results from unintended branches!

@mandarini mandarini force-pushed the use-branch-if-workflow_dispatch branch from 1ad0b26 to 5f3f584 Compare May 22, 2024 13:58
@mandarini mandarini merged commit 0752207 into nrwl:main May 22, 2024
6 checks passed
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.

4 participants