Skip to content

Callidus2000/PSGitea

Repository files navigation

Contributors Forks Stargazers Issues GPLv3 License


Gitea Powershell Module

This Powershell Module is a wrapper for the API of Gitea
Explore the docs »

Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

This Powershell Module is a wrapper for the API of Gitea. Gitea is a community managed lightweight code hosting solution written in Go which is published under the MIT license. Further information about Gitea can be found at https://gitea.io/.

The API is very well documented with swagger, documentation can either be found at https://try.gitea.io/api/swagger or (for your custom installation) at https://yourdomain.com/api/swagger.

The current Status of this project is BETA. I've cloned the necessary parts of my Dracoon Project as both projects provide a wrapper functionality for an existing API. The few existing functions are only for testing the base function (Invoke-GiteaAPI). In the near future it may happen that I've got tasked with automation of our internal Gitea setup and if this happens I will add the needed code to this project. Until then please consider contributing to the project.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

All prerequisites will be installed automatically.

Installation

The releases are published in the Powershell Gallery, therefor it is quite simple:

Install-Module Gitea -Force -AllowClobber

The AllowClobber option is currently neccessary because of an issue in the current PowerShellGet module. Hopefully it will not be needed in the future any more.

Usage

The module is a wrapper for the Gitea API. No special setup needed for getting started.

Now it's time to open the powershell. Prepare the basic variables:

$fqnd="https://mygitea.mydomain.com/"
$cred=Get-Credential -Message "PSGitea"
$connection=Connect-PSGitea -Url $url -Credential $cred

As you now have a connection to your Gitea installation you can use it to interact with it.

# Query the current user account
Get-GiteaCurrentAccount -Connection $connection

# Create a personal access token
$accessToken=New-GiteaAccessToken -Connection $connection -Name "pester"
# and connect with it
$secondConnection = Connect-Gitea -url $url -AccessToken $accessToken.sha1
# Delete the access token
Remove-GiteaAccessToken -Connection $connection -AccessToken pester

Roadmap

New features will be added if any of my scripts need it ;-)

See the open issues for a list of proposed features (and known issues).

If you need a special function feel free to contribute to the project.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. For more details please take a look at the CONTRIBUTE document

Short stop:

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GNU GENERAL PUBLIC LICENSE version 3. See LICENSE for more information.

Contact

Project Link: https://github.com/Callidus2000/PSGitea

Acknowledgements