Skip to content
/ jechova Public

Máte téma? A mohla bych ho vidět?

License

Notifications You must be signed in to change notification settings

pyvec/jechova

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jechová

Checks whether the next meetup is announced on 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.

screenshot

Usage

  1. Create a Slack app.
  2. Add scopes allowing the app to write to Slack channels (chat:write, chat:write.public).
  3. Create a bot user for the app so it can act independently.
  4. Install the app for your workspace.
  5. Find the bot token (starts with xoxb-) and set it as an environment variable before running the script:
$ 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. SLACK_API_TOKEN needs to be set as a secret. If you want Jechová to handle meetup in your town as well, just add a new workflow.

Dependencies and CI

@dependabot 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, 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.

About

Máte téma? A mohla bych ho vidět?

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages