Website: add support for annual auto issues, add new digital experience issue (#23218)

Changes:
- updated build-static-content to allow auto-issue rituals with a
`annually` frequency
- Updated the create-issues-for-todays-rituals script to create GH
issues for annually occurring rituals
- Added an annual ritual for checking GitHub's terms
- Added a responsibility to the Digital experience handbook page about
the ritual.

---------

Co-authored-by: Sam Pfluger <108141731+Sampfluger88@users.noreply.github.com>
This commit is contained in:
Eric
2024-10-27 11:48:05 -05:00
committed by GitHub
co-authored by Sam Pfluger
parent 0ba4a93f6d
commit 6094e31fad
4 changed files with 29 additions and 2 deletions
+4
View File
@@ -837,6 +837,10 @@ After the team member notifies the Head of Digital Experience (via Slack), the H
4. Go through the calendar and make sure all private meetings (e.g. 1:1's, E-Group, and quarterly board meetings) have "[no shadows]" in the event title.
### Check GitHub terms
Go to [GitHub's terms of services](https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-terms-of-service) and search “inbound=outbound” to find the clause, if still there as is, paste a screenshot into the table in this [document](https://docs.google.com/document/d/101rcp9v3Zdml4YolGRmqYS5ruAKzQvXLOTHLXCavPuE/edit#heading=h.xu6qsi0wrns). If the clause has changed, contact Mike M. and let him know.
## Rituals
@@ -221,6 +221,16 @@
description: "Log into the \"Integrations admin\" account in Salesforce and change the password to prevent a password change being required by Salesforce."
moreInfoUrl: "https://fleetdm.com/handbook/digital-experience#change-the-integrations-admin-salesforce-account-password"
dri: "eashaw"
-
task: "Check GitHub/GitLab terms"
startedOn: "2023-10-24"
frequency: "Annually"
description: "Check GitHub's terms to make sure the “inbound=outbound” clause is unchanged."
moreInfoUrl: "https://fleetdm.com/handbook/digital-experience#check-github-terms"
dri: "hollidayn"
autoIssue:
labels: [ "#g-digital-experience" ]
repo: "confidential"
-
task: "Check that there is sufficient availability for scheduling demos via fleetdm.com/contact"
startedOn: "2024-10-25"
+1 -1
View File
@@ -1010,7 +1010,7 @@ module.exports = {
});
let githubLabelsToCheck = {};
let KNOWN_AUTOMATABLE_FREQUENCIES = ['Daily', 'Weekly', 'Triweekly', 'Monthly'];
let KNOWN_AUTOMATABLE_FREQUENCIES = ['Daily', 'Weekly', 'Triweekly', 'Monthly', 'Annually'];
// Process each rituals YAML file. These will be added to the builtStaticContent as JSON
for(let ritualsYamlFilePath of ritualTablesYamlFiles){
// Get this rituals.yml file's parent folder name, we'll use this as the key for this section's rituals in the ritualsTables dictionary
+14 -1
View File
@@ -46,6 +46,8 @@ module.exports = {
ritualsFrequencyInMs = 1000 * 60 * 60 * 24 * 7 * 2;
} else if(ritual.frequency === 'Triweekly'){
ritualsFrequencyInMs = 1000 * 60 * 60 * 24 * 7 * 3;
} else if (ritual.frequency === 'Annually') {
ritualsFrequencyInMs = 1000 * 60 * 60 * 24 * 365;
} else if (ritual.frequency === 'Monthly') {
// For monthly rituals, we will create issues on the day of the month that the ritual was started on, or the last day of the month if the ritual was started on a day that doesn't exist in the current month
// (e.g, the next issue for a monthly ritual started on 2024-01-31 would be created for on 2024-02-29)
@@ -66,7 +68,18 @@ module.exports = {
}//fi
// Determine if we should create an issue for non-monthly rituals.
if(ritual.frequency !== 'Monthly') {
if(ritual.frequency === 'Annually') {
// Create a date of when the ritual started
let ritualStartedOn = new Date(ritual.startedOn);
let dayToCreateIssueOn = ritualStartedOn.getUTCDate();
let monthToCreateIssueOn = ritualStartedOn.getUTCMonth();
// Check if today's month and day match the ritual's start date
if (now.getUTCDate() === dayToCreateIssueOn && now.getUTCMonth() === monthToCreateIssueOn) {
isItTimeToCreateANewIssue = true;
}
nextIssueShouldBeCreatedAt = new Date(now.getUTCFullYear() + 1, monthToCreateIssueOn, dayToCreateIssueOn);
} else if(ritual.frequency !== 'Monthly') {
// Get a JS timestamp representing 12 PM UTC of the day this script is running.
let twelveHoursInMs = 1000 * 60 * 60 * 12;
let lastUTCNoonAt = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), 12, 0, 0, 0)).getTime();