{"id":21992725,"url":"https://github.com/pinpox/gitea-matrix-bot","last_synced_at":"2025-04-30T14:24:20.179Z","repository":{"id":48791226,"uuid":"181221362","full_name":"pinpox/gitea-matrix-bot","owner":"pinpox","description":"A bot to post gitea events to a matrix channel","archived":false,"fork":false,"pushed_at":"2024-02-28T09:58:40.000Z","size":203,"stargazers_count":18,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-22T03:08:36.324Z","etag":null,"topics":["bot","gitea","go","golang","matrix-org"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pinpox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-04-13T19:50:58.000Z","updated_at":"2024-01-30T12:16:40.000Z","dependencies_parsed_at":"2024-02-28T10:47:13.032Z","dependency_job_id":"97dd6858-cd8f-4717-8d00-56bdc6efc659","html_url":"https://github.com/pinpox/gitea-matrix-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinpox%2Fgitea-matrix-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinpox%2Fgitea-matrix-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinpox%2Fgitea-matrix-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinpox%2Fgitea-matrix-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinpox","download_url":"https://codeload.github.com/pinpox/gitea-matrix-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227206284,"owners_count":17747734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","gitea","go","golang","matrix-org"],"created_at":"2024-11-29T20:14:42.662Z","updated_at":"2024-11-29T20:14:43.154Z","avatar_url":"https://github.com/pinpox.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/pinpox/gitea-matrix-bot.svg?branch=master)](https://travis-ci.org/pinpox/gitea-matrix-bot)\n[![GoDoc](https://godoc.org/github.com/pinpox/gitea-matrix-bot?status.svg)](https://godoc.org/github.com/pinpox/gitea-matrix-bot)\n[![Go Report Card](https://goreportcard.com/badge/github.com/pinpox/gitea-matrix-bot)](https://goreportcard.com/report/github.com/pinpox/gitea-matrix-bot)\n[![codecov](https://codecov.io/gh/pinpox/gitea-matrix-bot/branch/master/graph/badge.svg)](https://codecov.io/gh/pinpox/gitea-matrix-bot)\n![Matrix](https://img.shields.io/matrix/gitea-matrix-bot:matrix.org.svg?label=%23gitea-matrix-bot%3Amatrix.org)\n\n# gitea-matrix-bot\nA bot to listen for [gitea](https://gitea.io) webhooks and post to a [matrix](https://matrix.org) channel\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/pinpox/gitea-matrix-bot/raw/master/logo.png\" width=\"300\" height=\"300\" /\u003e\n\u003c/p\u003e\n\nThis bot was build using my [bot framework](https://github.com/pinpox/matrix-bot/). If you stumble upon bugs on any of them please let me know!\n\n\n##### Status\nThis project is still in beta! You may encouter bugs, be sure to\n**report them** so they can be fixed!\nJoin the support channel for help and discussion:\n[#gitea-matrix-bot:matrix.org](https://matrix.to/#/#gitea-matrix-bot:matrix.org)\n\n# Usage\nIf you have already an instance of this bot running somewhere or someone is already hosting it publicly (lucky you!) and just want to add it to your room, this is how to create a webhook for your repository:\n\n1. Invite the bot to the room you want it to post to\n2. Find your room's id. This is **not** the name or adress! It starts with an exclamation mark and has a format like this`!DYgXKezaHgMbiPMzjX:matrix.org`\n3. Use the room ID to request a token from the bot `!gitea secret !DYgXKezaHgMbiPMzjX:matrix.org`. You can issue this command in a different room or private chat if you want to keep it secret if the room you're adding the bot to has members that are not supposed to view the token\n4. The bot will reply to you with instructions on how to set up the gitea webhook. Set up a webhook of type `gitea` with the url provided and use the token as secret. Select the specific types of events you want to be notified on or select \"All Events\"\n\nIt will probably look like this:\n![gitea scrot](./gitea-scrot.png \"Gitea Screenshot\")\n\n# Installation\nTo host the bot yourself, you will need to have a valid account on a matrix server and  create a configuration file.\n\nCopy config.ini.example to config.ini or create a file called config.ini with the\nfollowing options:\n\n```ini\n[http]\n# The path the listener will expect the post data\nhttp_uri = \"/post\"\n# The port the listener will listen on\nhttp_port = \"9000\"\n\n\n[matrix]\n# The matrix server to connect to\nmatrix_host = \"http://matrix.org\"\n# The matrix room to post to\nmatrix_room = \"#my-awesome-room:matrix.org\"\n# User credentions of the bot for posting to the room\nmatrix_pass = \"supersecretpass\"\nmatrix_user = \"my-awesome-bot\"\n\n\n[bot]\n# Path of the database to be used\ndb_path = \"./tokens.db\"\n```\nIf the database does not exist yet (your running the bot for the first time) you will have to use the `--initdb` flag to create it. This will create a sqlite3 database at the configured location with the expected table. \n\nThe following flags are avaitible for this bot:\n\n```\nFlags:\n      --help                 Show context-sensitive help (also try --help-long and --help-man).\n  -v, --verbose              Verbose mode, displays additional information.\n  -c, --config=\"config.ini\"  Configuration file to use\n      --initdb               Initialize the database. If it exists, it will be overwritten!\n      --sync=1               Matrix synchronizing interval\n      --version              Show application version.\n```\n\nIf everything went fine your gitea bot is now up and running! Make sure the configured port is open and the address reachable from the gitea server!\n\n# Contributing\n\nIf you would like to help you are **very welcome**, please submit\npull-requests!\n\nAlso, I'm looking for testers and bugs in the code. If you hit a problem, please\nbe sure to report it so it can be fixed. You can **open an issue** ticket or **contact\nme** in the room liked above.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinpox%2Fgitea-matrix-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinpox%2Fgitea-matrix-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinpox%2Fgitea-matrix-bot/lists"}