https://github.com/pyvec/jechova
Máte téma? A mohla bych ho vidět?
https://github.com/pyvec/jechova
Last synced: about 1 year ago
JSON representation
Máte téma? A mohla bych ho vidět?
- Host: GitHub
- URL: https://github.com/pyvec/jechova
- Owner: pyvec
- License: mit
- Created: 2020-08-01T18:06:23.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-04T06:30:42.000Z (about 2 years ago)
- Last Synced: 2025-04-24T05:15:30.991Z (about 1 year ago)
- Language: Python
- Size: 161 KB
- Stars: 3
- Watchers: 6
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jechová
Checks whether the next meetup is announced on [pyvo.cz](https://pyvo.cz/). If not, sends a message to the specified Slack channel to remind about the situation and provide a link to documentation on how anyone can fix it.

## Usage
1. [Create a Slack app](https://api.slack.com/apps?new_app=1).
1. Add scopes allowing the app to write to Slack channels (`chat:write`, `chat:write.public`).
1. Create a bot user for the app so it can act independently.
1. Install the app for your workspace.
1. Find the bot token (starts with `xoxb-`) and set it as an environment variable before running the script:
```bash
$ export SLACK_API_TOKEN=...
$ python jechova.py '#pyvo-praha' praha-pyvo
```
First argument is a channel name where the message should go. Beware, if you specify it as `#pyvo-praha`, standard shell interprets the `#` as a start of a comment and will ignore the rest of the line. You must pass it either as `pyvo-praha` or as `'#pyvo-praha'` (both works).
Second argument is the meetup slug used in the meetup URL. For example, if the meetup URL is `https://pyvo.cz/praha-pyvo/`, the slug would be `praha-pyvo`.
When debugging, force sending of the message by adding `-f`. (And use `#automatizace` or other less populated channel.)
## Deployment
The script is deployed as a [daily GitHub Action](https://github.com/pyvec/jechova/actions). `SLACK_API_TOKEN` needs to be [set as a secret](https://github.com/pyvec/jechova/settings/secrets). If you want Jechová to handle meetup in your town as well, just [add a new workflow](https://github.com/pyvec/jechova/tree/master/.github/workflows).
## Dependencies and CI
[@dependabot](https://dependabot.com/) is set up to automatically upgrade dependencies on the repo. It won't automerge PRs if there are no checks though, so there's also a [default build as a GitHub Action](https://github.com/pyvec/jechova/blob/master/.github/workflows/build.yml), currently only consisting of a linter check.
There are no tests. If the code breaks, we'll know when it crashes during the daily cron build.