Recipe default branch selection #394
Closed
opened 2023-01-27 12:52:23 +00:00 by moritz
·
3 comments
Labels
Clear labels
abra
awaiting-feedback
backups
bug
build
ci/cd
community organising
contributing
coopcloud.tech
design
documentation
duplicate
enhancement
fedi
fedi-infra
finance
funding
good first issue
help wanted
installer
legal
performance
proposal
question
security
test
wontfix
Everything to do with abra
Ping/pong on comms
Something is not working
Go build related issues
Getting the robots into the mix
Opening this thing up
Contributors stuff
Our main website
Design thinking required
Let's write things together
This issue or pull request already exists
New feature
Democratic decision making
Money things
Anything related to grant funding
Easy start with development
Need some help
Installation related issues
Performance related
Large change which requires feedback & decisin making
More information is needed
Securing our shit
Unit or integration test suite
This won't be fixed
Milestone
No items
No Milestone
Projects
Clear projects
No projects
abra v0.10.0
Done
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
BornDeleuze
Brooke
carla
cas (Cassowary)
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
iexos
jade (Jade Ambrose)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
moosemower
moritz
notplants
oxaliq (sorrel)
p4u1
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
renovate-bot (Comrade Renovate Bot)
ripclap
simon
sixsmith (Sixsmith)
stevensting
trav (Trav Fryer)
val (val (he/him))
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: toolshed/organising#394
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I run into trouble while upgrading https://git.coopcloud.tech/coop-cloud/onlyoffice because this repo has two branches
mainandmaster, but it's default ismain. The functionGetDefaultBranchprefersmasterovermain.There should be either a better way to find out wich is really the default branch or the selection preference should be at least documented anywhere.
My fix was to remove the old master branch and delete the local directory.
@moritz
FYI I did run in to a bug in that code again in coop-cloud/abra#261 and pushed a new fix based on various
go-gitchaotic API surface compromises... hopefully still working now 🤞Yeh, the default branch choice stuff, it's actually loaded into the
RecipeMetawhich reads from the repository settings and gets the default branch. The only thing is that reading that and passing it down the stack for more low-level git repository operations has proved awkward.A refactor could be to do some single repository query or caching to get the default branch from the gitea API and then attach that to the
Recipestruct itself? Then it's always available? But then not ideal for this offline scenario...This could definitely be improved, yeh.
toolshed/abra#453 (comment)
Sadly, this is still a shitshow but the current state of play:
TYPE=<recipe>:<branch>abrawill prefermainovermasternow due to a majority of our recipes supportingmainand alsoabrainit's recipes withmain(will be added to the migration notes)Let's continue on toolshed/abra#468