linux-system-roles / auto-maintenance

Linux system roles wide automated repo maintenance
MIT License
25 stars 15 forks source link

Add update_doc_text functionality to bz-manage.sh #281

Closed spetrosi closed 1 year ago

spetrosi commented 1 year ago

Now that all PRs in system roles follow the conventional commits format (see https://linux-system-roles.github.io/contribute.html#pr-description-format) we can automate updating doc texts in Bugzilla.

This PR expands the bz-manage.sh script with update_doc_text. To be run like ITR=9.3.0 sh ./bz-manage.sh update_doc_text.

When run, the script searches all PRs from the ITM and other filters provided and:

  1. If a BZ has required_doc_text flag set to + or -, the BZ is skipped. + indicates that the doc text has already been verified by a tech writer. - indicates that no release note is required.
  2. If a BZ has required_doc_text unset and GH PR set: Automatically add doc text from PR description
  3. If a BZ has required_doc_text? set and GitHub PR set: If the existing doc_text is empty, automatically add doc text from PR description. Else, print the current doc text and doc type, print the GH PR info, and ask user if they want to update the doc text.
  4. If a BZ has required_doc_text not set to + or - and GitHub PR unset: Print the current doc text and type, and ask user if they want to post a comment asking to attach a GH PR or enter the doc text.