Skip to content

Earlier creation of issue and subcommand

AnthonySandoval requested to merge earlier-creation-multiple-commands into master

Currently, the Weekly Newsletter is created via a pipeline cron that runs at the beginning of each week's on-call shift. Since adding the Announcements section at the top and merging the on-call handover and reliability team optional discussion meetings, the generation of the newsletter with last weeks' on-call report happens too late — there isn't enough time to add announcements in advance.

What does this change do?

This change introduces a subcommand add-oncall that finds the most recently created, open issue with the Reliability-Team-Newsletter label affixed to it, ingests the existing description, and appends the on-call report to the issue.

Once this MR is merged, the existing cron will be changed to use the new add-oncall subcommand. And a new cron will be added that takes the open issue and adds the On-Call Report to the end of the issue description before the start of the APAC On-call Handover Meeting. The root ./on-call-robot-assistant cron will be shifted out 24 hours allowing for a full 4 working days to add to the announcements before discussing at the next on-call handover meeting.

./oncall-robot-assistant --help
NAME:
   Oncall Robot Assistant - Generate an issue with Announcements and Oncall Tables and Statistics

USAGE:
   oncall-robot-assistant [global options] command [command options] [arguments...]

COMMANDS:
   add-oncall  add the oncall startistic to the issue description
   help, h     Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --debug         Print the issue instead of creating it. (default: false)
   --config value  Point to the config file [$CONFIG_FILE, $CONFIG]
   --help, -h      show help (default: false)

The change also refactored the way the config file is loaded. Using the urfave/cli library I've added a --config flag to point to a config file for use while debugging and testing this script.

Edited by AnthonySandoval

Merge request reports