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

Default to main and then master #698

Open
IlanCosman opened this issue Sep 9, 2020 · 4 comments
Open

Default to main and then master #698

IlanCosman opened this issue Sep 9, 2020 · 4 comments

Comments

@IlanCosman
Copy link

@IlanCosman IlanCosman commented Sep 9, 2020

Is your feature request related to a problem? Please describe.

Following the guidance of github, many developers are moving to main as their default branch. Saving developers from the very small hindrance of using DEFAULT_BRANCH: main would contribute to smoothing the transition.

Describe the solution you'd like

The default branch should be main. If it does not exist, use master, given that many repositories will continue using this name.

@admiralAwkbar
Copy link
Collaborator

@admiralAwkbar admiralAwkbar commented Sep 9, 2020

@IlanCosman Very valid and great points. Due to legacy issues, we need to find a good way to check the repository and look for source branches. I need to take a look and see the insides and how this could be easily achieved. If you have some cycles, maybe you can take a look and see if it could be an easy fix as well :)

Thanks

@IlanCosman
Copy link
Author

@IlanCosman IlanCosman commented Sep 9, 2020

It seems like it should be fairly easy, but I'm sure I'm missing something.

I forked the repo and changed DEFAULT_BRANCH="${DEFAULT_BRANCH:-master}" to DEFAULT_BRANCH="${DEFAULT_BRANCH:-origin/HEAD}". The dev action passed successfully.

I'm not sure how to test my changes elsewhere. I suppose I'd have to set up a dockerhub account, publich my image, and then try using it in another repository with various silly default branches?

@IlanCosman
Copy link
Author

@IlanCosman IlanCosman commented Sep 9, 2020

Oh, no it seems to work with uses: IlanCosman/super-linter@v3, cool.

@IlanCosman
Copy link
Author

@IlanCosman IlanCosman commented Sep 9, 2020

After a bit of testing I realize that I don't understand what the DEFAULT_BRANCH variable is supposed to do in the slightest. I'll leave this issue open since it seems to mean something to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.