A python script to automatically subscribe a user to the tasks they're interested in.
Go to file
2024-07-27 15:23:19 +12:00
sub_files Respect Blender's crawl delay request 2024-07-27 15:23:19 +12:00
.gitignore Intial commit 2024-05-20 18:23:00 +12:00
blender_activity_subscriber.py Add email notifications when you are subscribed to a issue/pull 2024-06-27 02:55:26 +12:00
example_person_info.py Add email notifications when you are subscribed to a issue/pull 2024-06-27 02:55:26 +12:00
Extra info.txt Intial commit 2024-05-20 18:23:00 +12:00
README.md Update readme with minor details about email notifications 2024-06-27 02:58:04 +12:00

Introduction

This is a python script design to automatically subscribe you to issues and pull requests you're interested in. You can filter out which issues and pulls you are interested in based on repo and labels.

The general overview of how this script works is as follows:

  1. The script collects recent activity in the Blender organization repositories.
  2. The script filters out which activities you're interested in by first checking to see if you're interested in the repo, and if you are, then checking to see if you're interested in the labels.
  3. Once it has filtered out the activities you're interested in, the script asks Gitea to subscribe you to the issue.
  4. If you have been subscribed to a issue, then you get notified in the command line or via email.

How to use

  1. Install Python and the cryptography python library with pip install cryptography (Cryptography is used to encrypt some private data)
  2. Copy example_person_info.py to person_info.py and fill out person_info.py with what you're interested in.
  3. Run python blender_activity_subscriber.py and follow the instructions provided by the script.

Known limitations

  1. Gitea will not notify you when the script subscribes you to a issue/pull. That's why the script notifies you in the terminal or via email.
  2. When you manually unsubscribe from a issue/pull, the script will re-subscribe you once something new happens on the issue/pull. A block list will help with this but is not currently implemented.
  3. The script decides what issues/pulls to subscribe you too by looking at recent activity in the Blender organization repositories, and subscribing you to the issue/pulls that meet your tracking criteria. The "recent activity" does not include changes to labels. So you will not be subscribed to a issue/pull that's had its labels changed until some other event that shows up in the recent activity feed occurs.
  4. The script will not automatically unsubcribe you from issues/pulls that have their labels changed to something you're not interested in. Although whether or not this is a limitation is up to personal preference.

Security

For this script to be able to subscribe you to issue/pull, it needs a Gitea API access token. With this access token, you can make modifications to many user editable pieces of Gitea. To keep things secure, please only allow the bare minimum API access when making your API token. For this script, this means "Read & Write" permission to public issues.

I will also note that the API token that you use will be saved to your computer in the file sub_files/api_token.json. The information inside the file is encrypted, but there is still a risk of someone obtaining it and decrypting it. So do not share this file.

FAQ

  • I've forgetten my decryption password, how do I reset it?
    • Delete the file sub_files/api_token.json and run the script again.
  • I've encountered a issue, what should I do?
    • You can contact me and ask for help. And I'll see if I can help, but my knowledge with Python is still relatively limited.