sub_files | ||
.gitignore | ||
blender_activity_subscriber.py | ||
example_person_info.py | ||
Extra info.txt | ||
README.md |
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:
- The script collects recent activity in the Blender organization repositories.
- 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.
- Once it has filtered out the activities you're interested in, the script asks Gitea to subscribe you to the issue.
- If you have been subscribed to a issue, then you get notified in the command line or via email.
How to use
- Install Python and the cryptography python library with
pip install cryptography
(Cryptography is used to encrypt some private data) - Copy
example_person_info.py
toperson_info.py
and fill outperson_info.py
with what you're interested in. - Run
python blender_activity_subscriber.py
and follow the instructions provided by the script.
Known limitations
- 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.
- 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.
- 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.
- 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.
- Delete the file
- 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.