Skip to content

Bug fix and clean up of "Schedule Monthly" workflow #8596

@t-will-gillis

Description

@t-will-gillis

Overview

We need to address minor code errors in "Schedule Monthly" that caused unintended results in the December run so that our workflows run as expected.

Details

The 12/1/25 run of the "Schedule Monthly" workflow did not work as expected in two areas:

  • First, on the message posted to the Monday agenda, the bot incorrectly listed four devs and their Skills Issues as "Non-team members with open issues." The bot should have closed the devs' Skills Issues prior to removing them from the website-write team, but the opposite occurred. The error can be traced to a missing await.
  • Second, the bot closed the wrong issue: # 8438 was closed instead of the intended # 8439. The fix for this error is also an opportunity to simplify a large section of code. Note that in create-new-issue.js, the created object const issue = await createIssue(owner, repo, inactiveLists); includes the URL for the issue. We can return this URL and use it in wr-schedule-monthly.yml directly, skipping the steps "Get owner url" and "Get issue number" in the job "Close new issue". The benefit is that we are ensured of having the correct issue number.
  • Also, in many places, the let variable declaration should be const.
  • Finally, the recently added workflow "Check Closed Issue for Linked PR" reopens the "Inactive Members" issue when "WR Schedule Monthly" closes it. Add non-PR contribution label to so this issue is not reopened.

Action Items

In trim-inactive-members.js:

  • Add an await to closePrework(username, inactiveWithOpenSkills[username]);- this function is async.
  • Change fs.writeFile() to fs.writeFileSync().

In create-new-issue.js :

  • Add return issue.html_url to main()

In wr-schedule-monthly.yml:

  • Change:
              const script = require('./github-actions/trigger-schedule/list-inactive-members/create-new-issue.js')
              script({g: github, c: context})  
    
    to:
              const script = require('./github-actions/trigger-schedule/list-inactive-members/create-new-issue.js')
              const newIssue = script({g: github, c: context})   
              return newIssue
    
  • Delete the entirety of steps "Get owner url" and "Get issue number"
  • Replace:
            run: gh issue close "${{ steps.get-owner-url.outputs.result }}/issues/${{ steps.get-issue-number.outputs.result }}"
    
    with:
            run: gh issue close "${{ steps.create-new-issue.outputs.result }}"
    
  • In inactive-members.md add the label non-PR contribution
  • Review the "Schedule Monthly wiki" carefully, and follow "Test Procedure" closely.

Resources/Instructions

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In progress (actively working)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions