GothenburgBitFactory / bugwarrior

Pull github, bitbucket, and trac issues into taskwarrior
http://pypi.python.org/pypi/bugwarrior
GNU General Public License v3.0
732 stars 209 forks source link

Fixes: #573. Add Basic Gitea support #1048

Open msglm opened 1 month ago

msglm commented 1 month ago

This PR lets you use Gitea when using some basic configuration, built off #720.

To test this, you should use this as your working config, it's what's worked for me:

[user_gitea]
service = gitea
gitea.login = YOUR-GITEA-USERNAME #no clue if this is a necessary given that username exists
gitea.username = YOUR-GITEA-USERNAME
gitea.host = YOUR-GITEA-INSTANCE
gitea.password = YOUR-GITEA-PASSWORD
gitea.token = A-VALID-GITEA-ACCESS-TOKEN
#Perhaps optional
gitea.description_template = "{{giteanumber}}: {{giteatitle}}"
gitea.only_if_assigned = true

Fair warning, this is a hack-job that sucks and needs a lot of clean up, quality of life, documentation, and feature improvements. I'll help whenever convenient, but this patch gets the job done for me as-is.

msglm commented 1 month ago

I've never wrote python tests before, so I have not done it yet.

Documentation is not very good, but I think gets the point across. The gitea feature here is rather indev, so it shouldn't be shocking.

I would like to remove the username-password login combo since making tokens is easy in Gitea, and the username-password login combo tends to break when you use OTP (I enforce it on my instance). Do you think that would be a good idea?

ryneeverett commented 1 month ago

I've never wrote python tests before, so I have not done it yet.

Not sure if you'd seen this already or if you'll find it helpful but there is a brief section in the guide on adding tests: https://bugwarrior.readthedocs.io/en/latest/contributing/new-service.html#tests