glab
Expert guidance for using the GitLab CLI (glab) to manage GitLab issues, merge requests, CI/CD pipelines, repositories, and other GitLab operations from the command line. Use this skill when the user needs to interact with GitLab resources or perform GitLab workflows.
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Expert guidance for using the GitLab CLI (glab) to manage GitLab issues, merge requests, CI/CD pipelines, repositories, and other GitLab operations from the command line. Use this skill when the user needs to interact with GitLab resources or perform GitLab workflows.
How to use
Sprawdź, czy glab jest zainstalowany, wpisując w terminal
glab --version. Jeśli narzędzie nie jest dostępne, zainstaluj je zgodnie z instrukcjami dla twojego systemu operacyjnego.Uwierzytelnij się w GitLabie za pomocą
glab auth login. Jeśli używasz self-hosted GitLaba, dodaj flagę--hostname gitlab.example.org. Możesz też ustawić zmienne środowiskoweGITLAB_TOKENiGITLAB_HOST, aby uniknąć logowania za każdym razem.Aby utworzyć merge request, najpierw wypchnij swoją gałąź:
git push -u origin nazwa-gałęzi. Następnie użyjglab mr create --title "Opis zmian" --description "Szczegóły", aby stworzyć pull request. Opcjonalnie dodaj recenzentów i etykiety:glab mr create --title "Tytuł" --reviewer=alice,bob --label=bug,urgent.Do recenzji merge requestów użyj
glab mr list --reviewer=@me, aby zobaczyć pull requesty czekające na twoją opinię. Checkout lokalnie za pomocąglab mr checkout numer-mr, przetestuj zmiany, a następnie zatwierdź:glab mr approve numer-mr.Zarządzaj issues poleceniami takie jak
glab issue create --title "Opis problemu" --label=bug. Skill zawiera też wskazówki do pracy z CI/CD pipelinami i innymi operacjami GitLaba – wszystkie dostępne bezpośrednio z wiersza poleceń.