• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Forums Add Git-Support to Hive Forums

Idea for a new forum? Is there an old dusty forum we don't need? Ideas for how to change a forum?
Status
Not open for further replies.
Hive contains lots of code and a lot of code resources.

Resource creators will often have their work saved in Git and maintaining the code and its versions on Hiveworkshop brings a lot of additional effort.

Maybe adding Git support to the forum would be a good idea?

Maybe a [GIT]-tag similar to a [Code]-tag, but taking a link to a file in a public Git-repo instead of plain code?

[GIT=<Link>]<CodeboxDescription>[/GIT] could result into:

Code:
<Code from Git file>

Other ideas welcome ;)
 

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,119
I actually talked with @Bribe about something similar.

Ralle said:
Hey :)

I was thinking of something like
[github]https://raw.githubusercontent.com/Kanma/MPQExtractor/master/README.md[/github]

which would embed the raw page of a file from github.

But maybe you want to make a view of the whole repo?

It just doesn't feel much like a resource then if it's just a link or an external thing.

Did you talk to him about this?
 
Did you talk to him about this?
He expressed his discomfort with maintaining his Git resources on THW here and I answered
Hive could benefit from git support
which led to me creating this thread a while after.

Apart from that, we didn't talk about it yet.

@Bribe considering you have talked to Ralle already, do you have additional points or a clearer picture regarding Git support that should be added to the main post?
 
I had found GitHub - darcyclarke/Repo.js: A plugin to embed Github repos on your site and https://emgithub.com/ . There is definitely the capability of embedding GitHub code onto websites, but it will also depend on how flexible the site is to be able to handle it.

One key point Ralle brought up:

emgithub might "go away" one day (e.g. how wc3c died). Hive has outlasted many websites, and reducing dependence on 3rd party "free" stuff would be ideal.

So ideally, the implementation would be using HiveWorkshop servers.

I'd personally rather HiveWorkshop itself be a git repository, and I'd gladly keep my source code committed here if it could do so.
 
Would the github API be an option if users were required to configure a github connection first?

@Bribe do you mean something like an enterprise account with repositories for approved users?
I'm thinking of a Master branch that acts as the fully-approved repository, and anyone can submit pull-requests for peer review.
 
I was thinking mostly of referencing a single "RAW" link to one file to embed it into a post. I could even make it cacheable in case github went away.
That should be sufficient, as embedding a single file probably makes up for 95% of the use cases. Caching is nice, too.
Thinking of Jassdoc, you will potentially have many embeddings of the same file across Hive.
 

LeP

LeP

Level 13
Joined
Feb 13, 2008
Messages
539
That should be sufficient, as embedding a single file probably makes up for 95% of the use cases. Caching is nice, too.
Thinking of Jassdoc, you will potentially have many embeddings of the same file across Hive.
If you want to link to just one native using the web interface (linked from the github readme) is probably better. All the software for that web interface is open source if anyone wants to host it themselves.



I didn't really follow the thread too much but if you want to go the way of git you could think about hosting a gogs/gitea/forgejo instance on hive. Forgejo is planning/working on instance-to-instance federation via activitypub so one could imagine a future where you could use your hive account to create issues and merge requests on other forgejo instances (and the reverse of course). Integrating it into the hive DB etc. is probably some work though.

Having a tag to simply embed a single file is i guess nice but doesn't scale too well it seems if you want to represent a whole repository.
 
Having a tag to simply embed a single file is i guess nice but doesn't scale too well it seems if you want to represent a whole repository.
That's true. I considered embedding a whole repository to be a rather rare use case. If I look at code resources hosted on Hive, the vast majority would do well with 1-3 single file embeddings.



To summarize what we've spoken about, there're 3 main ideas:
  1. Embedding a single file from Git
  2. Embedding a whole repository from Git
  3. Having a dedicated Hive repository where users can maintain their code in

The original idea of the thread was about 1), but I appreciate the other proposals.
3) is probably a separate topic that should have its own suggestion thread, though.
Considering implementation time, I understood that @Ralle finds 1) most suitable.
 
Status
Not open for further replies.
Top