drone/drone — pull request #666 by compressed (2014-11-05 20:57:37+00:00)
Title: Add gogs support

I've attempted to add some basic support for adding [gogs](https://github.com/gogits/gogs/) repos to be tested via drone.

There's no API for accessing gogs internals so a few concessions were made:

1. Need to scrape HTML gogs produces to pull the repo names
2. As a result, only public repos can be added.
3. Need to manually add the hook url via Gogs UI for any activated drone repo.

For 3, I've added some code to show the expected Gogs payload URL including the token whenever a gogs repo is activated. This is also displayed under the repo settings for the gogs remote. I needed to make a few changes to expose this token.

In your `.drone.toml`, you'll need to add a new setting, e.g.:

```
[gogs]
url="https://gogs.example.com"
```

When authorizing in drone, the username you provide should be the username the repos can be found under.

Let me know of any feedback and I will incorporate!