-
-
Notifications
You must be signed in to change notification settings - Fork 23
Manage movable holiday events with CI #181
Copy link
Copy link
Open
Labels
level: advancedRequire a lot of skill or experience with the projectRequire a lot of skill or experience with the projectpriority: highHigh priorityHigh prioritytype: featureA request for or implementation of a new featureA request for or implementation of a new feature
Metadata
Metadata
Assignees
Labels
level: advancedRequire a lot of skill or experience with the projectRequire a lot of skill or experience with the projectpriority: highHigh priorityHigh prioritytype: featureA request for or implementation of a new featureA request for or implementation of a new feature
What's the problem?
Some of the events we've got branding for, such as Eid al-Fitr and Holi, fall on different dates every year.
This means we manually update the start and end dates for these in order for the events to happen at the right time of year.
How can we solve that?
One approach is to leverage GitHub Actions to create an automatic pull request with the required changes every year.
For example, on January 1, a Python Discord GitHub App could open a pull request to this repository with all the movable holiday changes required for that year.
Implementation steps
scheduleas the trigger and runs on January 1st every year. This action can simply check out this repository, and then execute a Python file that will make the required changes to themeta.mdfiles that represent movable holidays.tibdex/github-app-token@v1to generate a token with the GitHub App credentials.peter-evans/create-pull-request@v3to create a pull request with the necessary changes.How do we know which events are movable?
The simplest way to do this would be to just add that information to the
meta.mdfiles for each movable holiday.E.g., we could do something like this:
This will tell us that this event is movable, will last 7 days from the start date, and that you can use
eid-al-fitrto look up the start date in the holiday API.This change would have to be made to all relevant events at the same time as we add this CI.