The Wayback Machine - https://web.archive.org/web/20220108131129/https://github.com/go-gitea/gitea/issues/16670
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 · 10 comments
Open

Gist like repo type #16670

crapStone opened this issue Aug 11, 2021 · 10 comments

Comments

@crapStone
Copy link
Contributor

@crapStone 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
@techknowlogick
Copy link
Member

@techknowlogick 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 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 lunny commented Aug 12, 2021

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

@techknowlogick
Copy link
Member

@techknowlogick techknowlogick commented Aug 12, 2021

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 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

@crapStone crapStone commented Sep 6, 2021

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 lunny commented Sep 7, 2021

Just close this and please discuss further in #693

@crapStone

This comment has been hidden.

@crapStone

This comment has been hidden.

@6543
Copy link
Member

@6543 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants