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

Gist like repo type #16670

Open
crapStone opened this issue Aug 11, 2021 · 37 comments
Open

Gist like repo type #16670

crapStone opened this issue Aug 11, 2021 · 37 comments
Assignees
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@crapStone
Copy link
Contributor

crapStone commented Aug 11, 2021

TLDR: GitHub gist feature for Gitea

Long Version:

Add a new repo type named "Gist" and show them in the webui like a GitHub Gist:

  • show all files as previews on one page
  • have a comment section below
  • only one branch exists (pre-push hook to block everything else)
  • show a tab with commits/revisions not with as list of commits but with a list of diff-views
  • allow forks but not PRs

Proposals for implementation:

  • URL: <base-url>/<user_or_organization>/gists/<uuid> (gists must be a blacklisted repo name)
  • save gist as repo (add a RepoType field to database)
  • adjust routing to first check for gists and go to gist handling; else go to user repo handling
  • add new comment type for gist comments
@6543 6543 added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Aug 11, 2021
@6543 6543 mentioned this issue Aug 11, 2021
6 tasks
@techknowlogick
Copy link
Member

techknowlogick commented Aug 11, 2021

+1 for the above.

only one branch exists (pre-push hook to block everything else)

In addition to this, IIRC, GH gists also use hooks to block binary files. Perhaps that is also something for us to consider

Edit: Also no folders are allowed either.

@crueber
Copy link

crueber commented Aug 11, 2021

* show a tab with commits/revisions not with as list of commits but with a list of diff-views

I feel like this isn't even really necessary, myself. Certainly a nicety though.

@lunny
Copy link
Member

lunny commented Aug 12, 2021

So that we also need a new column in repository table named uuid.

@techknowlogick
Copy link
Member

So that we also need a new column in repository table named uuid.

We won't, as we can use repo_name with and populate it with uuid

@OhYee
Copy link

OhYee commented Aug 31, 2021

URL: <base-url>/<user_or_organization>/gists/<uuid> (gists must be a blacklisted repo name)

Is it possible to implement anonymous code paste?
Like https://paste.ubuntu.com/

It seems that in the current design, an account must be logged in

@crapStone
Copy link
Contributor Author

Gists are a way to share information with one or a few files.

You want a pastebin-like service and there is another issue where this is discussed (#693).

@lunny
Copy link
Member

lunny commented Sep 7, 2021

Just close this and please discuss further in #693

@lunny lunny closed this as completed Sep 7, 2021
@lunny lunny added the issue/duplicate The issue has already been reported. label Sep 7, 2021
@crapStone

This comment has been minimized.

@crapStone

This comment has been minimized.

@6543 6543 removed the issue/duplicate The issue has already been reported. label Sep 10, 2021
@6543
Copy link
Member

6543 commented Sep 10, 2021

@lunny did close old issue -> see reason - this proposal here is a better aproach and wont add much extra code etc ...

@6543 6543 reopened this Sep 10, 2021
@psjbeisler
Copy link

Gists / Snippets always had a social aspect to them and with Federation coming up, the thought of a (possibly Federated) Gitea snippet feed is cool.

https://gitlab.com/explore/snippets
https://gist.github.com/discover

@bryanpedini
Copy link

We won't, as we can use repo_name with and populate it with uuid

⁉️ ⁉️ ⁉️
repo_name is "gists"...

also, my 2c, I think GH uses the commit ID as URL, which IMO is actually easier to handle than "actual routing"

PS: please (if possible, dunno, not a Gitea coder) use .gists or .somethingelse as reserved repo name, I mean, something that nobody would possibly think to use, with a dot before or an underscore or something, not something "plaintext"...

@techknowlogick
Copy link
Member

@bryanpedini Github uses a fresh repo for each gist, as otherwise when cloning people could discover secret gists, as well if using the commit ID the gist would change location on each change

@realaravinth
Copy link
Contributor

Hello,

I'm working on a gist program which will have features very similar GitHub Gists but with subtle differences:

  • Directories are permitted: multi-file gists are already permitted in all implementations that I surveyed, directories allow for better organization, which is nice.
  • Federation via Activity Pub: I want to support federated comments but to do that, I'll also have to support federated gists(what will users comment on? :D), therefore gists and comments will be federated(federated forking, star/favorite and comments)

Currently, it has a standalone authentication/user management mechanism(i.e people can signup using email IDs), but OAuth integration with Gitea is planned. The full feature list is available on the repository's README.

I would appreciate any inputs you might have :)

@ptman
Copy link
Contributor

ptman commented Feb 18, 2022

@realaravinth are the features listed already implemented or is that a feature-todo in the readme?

@realaravinth
Copy link
Contributor

@ptman it's a todo list :)

The project is less than a week old but I hope to get posting gists and commenting on it from the web UI working by the end of next week.

The following things are implemented so far:

  • Authentication
  • Account management(credential updates, account deletion, etc.)
  • Adding gists and reading gists

But all of the above features are implemented using REST API only. Web UI is in progress.

@Kcalb35
Copy link

Kcalb35 commented Apr 5, 2022

Are there any news or progress?

@RokkuCode
Copy link

@realaravinth @ptman would you mind to discuss this outside of this issue. i am not interested in a third party tool but i want to see gists in gitea. thanks.

@bryanpedini

This comment was marked as off-topic.

@squirrelroad

This comment was marked as outdated.

@tahaghafuri

This comment was marked as off-topic.

@tahaghafuri

This comment was marked as duplicate.

@techknowlogick
Copy link
Member

@tahaghafuri thank you for your enthusiasm for this ticket. Please keep discussion of the ticket limited to this issue, no need to open multiple other tickets.

@lunny lunny mentioned this issue Mar 29, 2023
@splashsky
Copy link

How is this looking at the moment?

@ptman
Copy link
Contributor

ptman commented Apr 12, 2023

https://github.com/thomiceli/opengist

@crueber
Copy link

crueber commented Apr 13, 2023

https://github.com/thomiceli/opengist

I want to applaud you for just going and getting it done. I'll definitely be using yours for the time being. I would prefer that it was tied in to the Gitea auth system, but for my current needs, that's great. Thanks for the advert here.

@ptman
Copy link
Contributor

ptman commented Apr 20, 2023

Not mine but @thomiceli . I would also prefer that it was integrated to gitea instead of separate and duplicating lots of functionality. But it can auth via gitea.

@realies
Copy link

realies commented Jul 11, 2023

A few years ago, I wondered if this was being worked on. I am surprised not to see it in Gitea today.

@Mai-Lapyst
Copy link
Contributor

A few years ago, I wondered if this was being worked on. I am surprised not to see it in Gitea today.

No, currently no-one is working on this. And tbh please on all you out there: if you want it so badly for years then start working on it yourself instead of pinging this issue every few months.

@crapStone
Copy link
Contributor Author

https://github.com/thomiceli/opengist

This works perfectly and can be registered as OAuth application in Gitea

@Mai-Lapyst
Copy link
Contributor

Mai-Lapyst commented Jan 15, 2024

@crapStone

https://github.com/thomiceli/opengist

This works perfectly and can be registered as OAuth application in Gitea

... once more: please only bump this issue if this feature is being added into gitea. All people following this issue are well aware that there are 3rd party tools you can plug into it and it kinda works. But we want this as first-party solution inside gitea. Thanks.

@6543
Copy link
Member

6543 commented Jan 15, 2024

I emphasize not bloating gitea ... so this is a perfect solution in my eyes.

why add more maintenance burden if you gain nothing beside copy paste something who is already easy to host too ?!?

@6543 6543 added type/docs This PR mainly updates/creates documentation and removed type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels Jan 15, 2024
@Mai-Lapyst
Copy link
Contributor

I emphasize not bloating gitea ... so this is a perfect solution in my eyes.

why add more maintenance burden if you gain nothing beside copy paste something who is already easy to host too ?!?

Easy: From a administration side, I dont want to run, maintain, configure, test multiple services if I dont have to. Espc checking for updates, diffing config settings, doing the actual update + maybe managing downtime with users.

Also from a user point of view, I hate it to logging into multiple sites, remember multiple urls. It also is a problem when you want a consistent style between the gitea and the gist service; espc when it comes to editing experience. This is better handled inside gitea itself imo.

And if we argue of maintenance burden, we also could argue gitea should not have a ci tool as well, as it might not be needed by everyone, yet it is added since it is a sensefull and good addition. Same applies to gists imho.

@6543
Copy link
Member

6543 commented Jan 15, 2024

AS a gitea maintainer, i dont want to maintain something who i can also run it on a raspbery pi and is setup in exactly 5 minutes - just did so.

and yes I also was against adding ci, just see my profile ...
but in terms of adoption more maintainers voted for adding it - but have it equal to other solutions, so on can decide how bloated a gitea installation should get

6543 pushed a commit that referenced this issue Jan 15, 2024
This PR adds a section to the documentation that links to the project
[Opengist](https://github.com/thomiceli/opengist) on GitHub.

The feature was proposed in #16670 but didn't resonate well with the
maintainers.
@6543 6543 closed this as completed Jan 15, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jan 15, 2024
@techknowlogick
Copy link
Member

I’m going to re-open this, as unlike adding CI, the suggested route for snippets is a repo with a different template and a bit more rules around them. Similar to our wiki setup (where it’s an enum in a db row). It’s on my 2024 list of things I’d like to accomplish (not guaranteeing it make it in, as I’d need to work on the PR, but also get reviews, and receive approval from other maintainers).

@delvh
Copy link
Member

delvh commented Jan 15, 2024

Okay, I'll go grab some 🍿 and let you fight over it.

@techknowlogick
Copy link
Member

All in good spirits :) I think once my PR is seen, then it'll help fully articulate what I'm thinking, and if not it can be closed.

@lunny lunny removed the type/docs This PR mainly updates/creates documentation label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests