https://github.com/metal-stack/metal-robot
A bot helping to automate some tasks on Github and Gitlab. 🤖
https://github.com/metal-stack/metal-robot
Last synced: 8 months ago
JSON representation
A bot helping to automate some tasks on Github and Gitlab. 🤖
- Host: GitHub
- URL: https://github.com/metal-stack/metal-robot
- Owner: metal-stack
- License: mit
- Created: 2020-07-08T14:15:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-22T10:36:31.000Z (about 1 year ago)
- Last Synced: 2025-04-06T16:53:04.724Z (9 months ago)
- Language: Go
- Size: 278 KB
- Stars: 7
- Watchers: 7
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# metal-robot 🤖
A bot helping to automate some tasks on Github and Gitlab.
## Task Descriptions
- Automatically add releases of certain repositories to the [releases](https://github.com/metal-stack/releases) repository (`develop` branch)
- Automatically add a commit and PR for swagger client repositories to update their clients (`auto-generate/` branch, Github action needs to generate the client and push it back to this branch)
- Automatically add a commit and PR for docs repository after a metal-stack release
- Adds a comment on [docs](https://github.com/metal-stack/docs) PRs to a rendered preview
- Create team for repository maintainers on repository creation (can be used for CODEOWNERS)
## Development
Developing this effectively is a little iffy because you require Github and Gitlab to push their webhooks to your local machine.
When the robot is already deployed into a Kubernetes cluster and webhooks are coming in, you can make use of [telepresence](https://www.telepresence.io/) to proxy the requests to your local machine. Even though it seems a bit scary what telepresence does, it works. The installation of it was wrapped into a Docker container, which is built before start. The container requires privileged and host network to run though. Please take a look at the [Makefile](Makefile) and read about telepresence before you use it. Then decide if you really want to do it.
If you have any better ideas, please open a PR or an issue.
Here is how to do it:
```
# build and start the robot locally
make start
# in another terminal window run
make swap
# this requires:
# - Ubuntu & Docker
# - KUBECONFIG env var points to the cluster where the robot is deployed
# - the deployment in the cluster needs to be called "metal-robot"
#
# when you are done, exit the container shell
# if your session was really long, telepresence sometimes does not swap
# back the deployment properly. delete the temporary deployment and redeploy
# the robot if necessary.
```