Skip to content

Commit

Permalink
Update configuration key
Browse files Browse the repository at this point in the history
Changes `forStaff` to `publishFullDigest`, which better describes what
is happening
  • Loading branch information
jimchamp committed May 22, 2024
1 parent 19fd5da commit f976af6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"slackChannel": "#openlibrary-leads-g",
"forStaff": false,
"publishFullDigest": false,
"leads": [
{
"githubUsername": "hornc",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"slackChannel": "#team-abc-plus",
"forStaff": true,
"publishFullDigest": true,
"leads": [
{
"githubUsername": "mekarpeles",
Expand Down
8 changes: 4 additions & 4 deletions scripts/gh_scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ A configuration file is required for this script to run properly. The file shou

`slackChannel` : The digest will be published here.

`forStaff` : Boolean that flags whether this digest is for staff, or for other leads. If `false`, the digest will be published without several sections.
`publishFullDigest` : Boolean that flags whether to publish a full or partial digest. If `false`, the digest will be published without several sections (see **Details**, below).

`leads` : Array of configurations for each lead.

Expand All @@ -103,12 +103,12 @@ The script prepares a digest containing the following sections:

*Recent comments* : A list of links to issues that need comments, broken down by lead.

*Needs: Lead/Assignee* : Lists of pull requests that do not have an assignee, and issues that need a lead. Only present if `staffOnly` is `true`.
*Needs: Lead/Assignee* : Lists of pull requests that do not have an assignee, and issues that need a lead. Only present if `publishFullDigest` is `true`.

*Untriaged issues* : List of issues which have the https://github.com/internetarchive/openlibrary/labels/Needs%3A%20Triage label. Only present if `forStaff` is `true`.
*Untriaged issues* : List of issues which have the https://github.com/internetarchive/openlibrary/labels/Needs%3A%20Triage label. Only present if `publishFullDigest` is `true`.

*Assigned PRs* : List of pull requests that have been assigned, broken down by lead. Links to higher priority PRs are also included here.

*Staff PRs* : List of all open staff PRs. Only present if `forStaff` is `true`.
*Staff PRs* : List of all open staff PRs. Only present if `publishFullDigest` is `true`.

*Submitter Input for PRs* : List of PRs that are labeled https://github.com/internetarchive/openlibrary/labels/Needs%3A%20Submitter%20Input, broken down by leads.
10 changes: 5 additions & 5 deletions scripts/gh_scripts/weekly_status_report.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ async function main() {
const openPullRequests = await fetchOpenPullRequests()
const nonDraftPullRequests = openPullRequests.filter((pull) => !pull.draft)

if (config.forStaff) {
if (config.publishFullDigest) {
await prepareUnassignedItems(nonDraftPullRequests)
.then((results) => lines.push(...results))
await prepareUntriagedIssues(config.leads)
.then((results) => lines.push(...results))
}
lines.push(...prepareAssignedPullRequests(nonDraftPullRequests, config.leads))
if (config.forStaff) {
if (config.publishFullDigest) {
lines.push(...prepareStaffPullRequests(nonDraftPullRequests, config.leads))
}
lines.push(...prepareSubmitterInput(nonDraftPullRequests, config.leads))
Expand All @@ -56,9 +56,9 @@ async function main() {
* Represents a configuration for this script.
*
* @typedef {Object} Config
* @property {string} slackChannel The Slack channel where messages will be posted
* @property {boolean} forStaff `true` if this digest is for staff only
* @property {Array<Lead>} leads Project leads that will be included in this digest
* @property {string} slackChannel The Slack channel where messages will be posted
* @property {boolean} publishFullDigest `true` if this digest is for staff only
* @property {Array<Lead>} leads Project leads that will be included in this digest
*/

/**
Expand Down

0 comments on commit f976af6

Please sign in to comment.