actions-js / push

⬆️ Push changes made by actions right back into the current repository.
MIT License
89 stars 51 forks source link

Warn people about where this action will push to if not specified #24

Open joelcoxokc opened 1 year ago

joelcoxokc commented 1 year ago

Please let people know that even if you run this workflow under a workflow_dispatch on a dev branch, if branch is not specified then it will push all dev code to your main branch.

We have four branches. main -> staging -> qa -> dev

I ran this action on my dev branch... and did not specify the branch property. And it pushed all my dev code to our main production branch.

This could be very dangerous in many environments.

I personally think that the branch should not default to main, but should default to the branch that HEAD is on

lpender commented 8 months ago

I agree -- I think it should push to whatever branch it's in by default.

ImanMahmoudinasab commented 7 months ago

@devenes I think the default value for the branch should change to the current branch unless the user defines the branch name. I can apply this change as part of the next breaking change.