Skip to content

Update "Schedule Monthly" workflow to account for July, Dec. breaks #7083

@t-will-gillis

Description

@t-will-gillis

Overview

The "Schedule Monthly" workflow1 currently does not account for the July break, so devs who do not contribute during the month will be listed as "inactive" by the bot and potentially removed. We want the workflow to account for the July break.

Action Items

  • In schedule-monthly.yml2 , adjust the cron job to account for the July break by skipping the currently scheduled run on August 1st:

        - cron:  0 11 1 2-7,9-12 *
    
  • Same file, update the comment near line 3:

    # This action runs at 11:00 UTC/ 4:00 PDT on the first day of every month except January and August.
    
  • In get-contributors-data.js3 lines 16 and 17, the variables oneMonth and twoMonths are set to "2" and "3" respectively on the February 1st run to account for the December break. Add the same logic for the September 1st run to account for the July break. Replace:

    // Set date limits: we are sorting inactive members into groups to warn after 1 month and remove after 2 months.
    // Since the website team takes off the month of December, the January 1st run is skipped (via `schedule-monthly.yml`).   
    // The February 1st run keeps the 1 month inactive warning, but changes removal to 3 months inactive (skipping December).
    let today = new Date();  
    let oneMonth = (today.getMonth() == 1) ? 2 : 1;            // If month is "February" == 1, then oneMonth = 2 months ago
    let twoMonths = (today.getMonth() == 1) ? 3 : 2;           // If month is "February" == 1, then twoMonths = 3 months ago
    

    with:

    // Set date limits: we are sorting inactive members into groups to notify after 1 month and remove after 2 months.  
    // Since the teams take off December and July, the Jan. 1st and Aug. 1st runs are skipped (via `schedule-monthly.yml`). 
    // The Feb. 1st and Sept. 1st runs account for skipped months: 'oneMonth' & 'twoMonths' = 2 & 3 months respectively
    let today = new Date();
    let oneMonth = (today.getMonth() === 1 || today.getMonth() === 8) ? 2 : 1;
    let twoMonths = (today.getMonth() === 1 || today.getMonth() === 8) ? 3 : 2;
    
  • NOTE: Although this file is a GitHub Action, testing is not required for this issue.

Resources/Instructions

Footnotes

  1. "Schedule Monthly" and "WR-Schedule Monthly" wiki

  2. schedule-monthly.yml

  3. get-contributors-data.js

Metadata

Metadata

Assignees

Labels

Complexity: SmallTake this type of issues after the successful merge of your second good first issueFeature: Refactor GHARefactoring GitHub actions to fit latest architectural normsLang: GHAGitHub Actionsrole: back end/devOpsTasks for back-end developerssize: 0.5ptCan be done in 3 hours or lesstime sensitiveNeeds to be worked on by a particular timeframe

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions