Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Support for snippets #872

Open
darix opened this issue Oct 12, 2021 · 8 comments · May be fixed by #982
Open

Support for snippets #872

darix opened this issue Oct 12, 2021 · 8 comments · May be fixed by #982
Labels
enhancement New feature or request stale

Comments

@darix
Copy link

darix commented Oct 12, 2021

creating/listing/deleting would be nice

and for creating something like somecommand | glab snippet new - would be nice.

@darix darix added the enhancement New feature or request label Oct 12, 2021
@clemsbot
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. We haven't had the time to address it yet, but we want to keep it open. This message is just a reminder for us to help triage issues.

@clemsbot clemsbot added the stale label Nov 12, 2021
@georgexsh
Copy link

+1 for this

@clemsbot clemsbot removed the stale label Feb 8, 2022
zemzale added a commit to zemzale/glab that referenced this issue Feb 8, 2022
This adds two simple API wrappers for creating snippets for the user and
inside the project. This should help us start work with creating a
snippets command.

Issue profclems#872
@zemzale
Copy link
Collaborator

zemzale commented Feb 8, 2022

I am gonna slowly started working on this. Won't be very fast since I don't have that much time to work on this, but I hope for some slow and steady progress

@Lucas-C
Copy link

Lucas-C commented Feb 9, 2022

I'd love to have this feature too!

Given that Drag and Drop is not implemented for now on Gitlab side, I'd be great to be able to glab snippet new file1.py file2.rb in order to quickly create a snippet ! And to update it: glab snippet updatefile1.py file2.rb maybe?

zemzale added a commit to zemzale/glab that referenced this issue Feb 10, 2022
This adds a simple snippet creation command. This currently just allows
for creating snippets from STDIN like so:

`echo "this is a script" | glab snippet create --title "snippet" --filename "example.py"`

There are few things that are missing from this, like ability to add
more then one file to the snippet, but that is not supported by the "github.com/xanzy/go-gitlab" yet.

Issue is opened for that xanzy/go-gitlab#1372

Issue profclems#872
zemzale added a commit to zemzale/glab that referenced this issue Mar 8, 2022
This adds a simple snippet creation command. This currently just allows
for creating snippets from STDIN like so:

`echo "this is a script" | glab snippet create --title "snippet" --filename "example.py"`

There are few things that are missing from this, like ability to add
more then one file to the snippet, but that is not supported by the "github.com/xanzy/go-gitlab" yet.

Issue is opened for that xanzy/go-gitlab#1372

Issue profclems#872
@clemsbot
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. We haven't had the time to address it yet, but we want to keep it open. This message is just a reminder for us to help triage issues.

@clemsbot clemsbot added the stale label Mar 12, 2022
@zemzale zemzale removed the stale label Mar 14, 2022
zemzale added a commit to zemzale/glab that referenced this issue Mar 16, 2022
This adds a simple snippet creation command. This currently just allows
for creating snippets from STDIN like so:

`echo "this is a script" | glab snippet create --title "snippet" --filename "example.py"`

There are few things that are missing from this, like ability to add
more then one file to the snippet, but that is not supported by the "github.com/xanzy/go-gitlab" yet.

Issue is opened for that xanzy/go-gitlab#1372

Issue profclems#872
@zemzale
Copy link
Collaborator

zemzale commented Mar 16, 2022

So I have created the initial support for adding snippets, but that only works for a single file, because the GitLab API library didn't support it when writing the initial PR, but it does now since I added that there. So there are a few things to do

  • Update the GitLab API library to the newest version to support multiple file uploads
  • Add the support for multiple files in the create command
  • Add missing commands
    • Update command
    • View command
    • Delete command

@Lucas-C
Copy link

Lucas-C commented Mar 16, 2022

Wow, great, thanks for working on this @zemzale !

@zemzale zemzale linked a pull request Mar 17, 2022 that will close this issue
5 tasks
@clemsbot
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. We haven't had the time to address it yet, but we want to keep it open. This message is just a reminder for us to help triage issues.

@clemsbot clemsbot added the stale label Apr 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants