silverstripe / addons.silverstripe.org

Website hosting Silverstripe Framework extensions
BSD 3-Clause "New" or "Revised" License
13 stars 16 forks source link

Repositories with main branch #273

Open Zerogiven opened 2 years ago

Zerogiven commented 2 years ago

By default github now using branch "main" instead of "master".. i did not make any researchs, but like i already made some PR in the module rating repo, i think here is also the problem why for example my readme file is not displaying on addons.silverstripe.org.

Example packges:

How often will the readme getting an update? I tried to make a temporarly master branch for one of my packages but this would not be the solution for me ;-)

Maybe it's an other problem but maybe this could be a hint for you where to look for...

I already made a fork from this repo, trying to find out why it's not getting anything, no readme, no module ratings but packages has every condition (editorconfig, unit tests and so on...). Only thing i saw in a very fast look was that there is a MasterVersion function inside Addon Model.

The easiest solution would be calling both branches, master and main. If you get nothing from master you could check main. The best solution would be fetching the default branch from somewhere (not sure if you are getting it from packagist for example, otherwise from the source code providers api).

cheers

andrewandante commented 2 years ago

Hi @Zerogiven , you can see that there's a long-open issue about the updater: #268 - that this is probably covered by. This is an open repo so if you want to spend some time looking then it would be appreciated 😄

Zerogiven commented 2 years ago

That's the plan, i already forked it, just have a few problems with vagrant (normally running my silverstripe stuff with docker) :smile: However, i don't think a bugfix would be a very hard challenge

And sorry for doubling the issue, but i'm not 100% sure if they are the same problem.. but if you want you can close this issue and i will post/ask there.

My first conclusion of research is that after i created a master branch at https://github.com/CSoellinger/silverstripe-model-annotations-task the README and some of the module rating things are now fetched. This is only a temp solution cause i don't want doubling my main branch only cause of this problem :)

andrewandante commented 2 years ago

Yep makes sense not to double it, especially when Github is pushing for main over master 😄

I link the other issue as I'm keen to see if a fix for one can fix the other, or if it can at least point us in the right direction. Appreciate your time on this!

xini commented 2 years ago

The problem is that the readme is never updated. It is only read once, when the repo is read and created first.

See initial build here: https://github.com/silverstripe/addons.silverstripe.org/blob/master/app/src/services/AddonBuilder.php#L135

Update task doesn't contain anything readme related: https://github.com/silverstripe/addons.silverstripe.org/blob/master/app/src/services/AddonUpdater.php#L56

Zerogiven commented 2 years ago

@xini can not confirm that... after i created only the branch called "master" my readme was updated at addons.silverstripe.org... i did not had the time to get more familiar with that code, however maybe soon i can fix that