diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml index 6d79773..4c4f88c 100644 --- a/.github/linters/.markdown-lint.yml +++ b/.github/linters/.markdown-lint.yml @@ -4,4 +4,7 @@ MD004: # Ordered list item prefix MD029: - style: one + style: ordered +# +MD013: + line_length: 300 diff --git a/.github/workflows/create-meeting.yml b/.github/workflows/create-meeting.yml index de63ec4..c541a41 100644 --- a/.github/workflows/create-meeting.yml +++ b/.github/workflows/create-meeting.yml @@ -5,7 +5,7 @@ env: on: workflow_dispatch: schedule: - - cron: '0 9 * * WED' + - cron: '30 15 * * WED' jobs: meeting-issue: diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 8c4daf6..b13a28c 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -42,3 +42,5 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TYPESCRIPT_DEFAULT_STYLE: prettier VALIDATE_JSCPD: false + VALIDATE_MARKDOWN: false + FILTER_REGEX_EXCLUDE: .*dist/.* \ No newline at end of file diff --git a/README.md b/README.md index 543cdcd..fe0c1e2 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,34 @@ -Welcome to the Fedora CoreOS Meeting tracker. This repo serves as a tracker for creating issues to track upcoming FCOS meetings. The issues are generated every Wednesday, and are meant to be used by the community meeting host as a guide for running the meeting. +# FCOS-Meeting-Action -The meeting notes are formed from three major parts. The first part is the [meeting template](./static/meeting-template.md), which is the base of the meeting notes. The second, and third parts are formed from the topics in the [fedora-coreos-tracker](https://github.com/coreos/fedora-coreos-tracker) repo and the past action items from the prior community meeting [fedora-meetings](https://meetbot-raw.fedoraproject.org/teams/fedora_coreos_meeting/fedora_coreos_meeting). +Welcome to the Fedora CoreOS Meeting tracker. This repository serves as a tracker for creating issues to track upcoming FCOS meetings. The issues are generated every Wednesday, and are meant to be used by the community meeting host as a guide for running the meeting. + +The meeting notes are formed from three major parts. The first part is the [meeting template](./static/meeting-template.md), which is the base of the meeting notes. The second, and third parts are formed from the topics in the [fedora-coreos-tracker](https://github.com/coreos/fedora-coreos-tracker) repository and the past action items from the prior community meeting [fedora-meetings](https://meetbot-raw.fedoraproject.org/teams/fedora_coreos_meeting/fedora_coreos_meeting). The Fedora CoreOS Working Group works to bring together the various technologies and produce Fedora CoreOS. Get Fedora CoreOS -The Fedora CoreOS Working Group has a weekly meeting. The meeting usually happens in #fedora-meeting-1 on irc.libera.chat (Webchat) and the schedule for the meeting can be found here: https://calendar.fedoraproject.org/CoreOS/ Currently, meetings are at 16:30 UTC on Wednesdays. +The Fedora CoreOS Working Group has a weekly meeting. The meeting usually happens in #fedora-meeting-1 on irc.libera.chat (Webchat) and the schedule for the meeting can be found in this [calendar](https://calendar.fedoraproject.org/CoreOS/) Currently, meetings are at 16:30 UTC on Wednesdays. As the Matrix/IRC bridge is down, it is currently not possible to attend the meeting from a Matrix account and you have to join using IRC. You can use the Webchat to temporarily join the meeting on IRC. Steps to run the meeting - Navigate to this week's meeting and follow the steps presented. - -Working days: non-holiday weekdays. Relevant holidays are the national holidays of the USA, Western Europe, and India. \ No newline at end of file + Navigate to this week's meeting and follow the steps presented. + +Working days: non-holiday weekdays. Relevant holidays are the national holidays of the USA, Western Europe, and India. + +# Development + +## Prerequisites + +- install node package manger (npm) +- use npm to install TypeScript `npm install Typescript --save-dev` + +## Dev Workflow + +- Work against the `.ts` files to add your changes +- Compile them using `npm run bundle` which produces `.js` files +- Commit the `.ts` and `.js` files + +### Note + +The action uses the `.js` files to run the action, and are found in the `dist` directory. The `.ts` files are used for development purposes only. \ No newline at end of file diff --git a/dist/actionItems.js b/dist/actionItems.js index fef6d80..54e22da 100644 --- a/dist/actionItems.js +++ b/dist/actionItems.js @@ -35,19 +35,19 @@ async function GetActionItems() { // Set constants const actionItemsRegEx = new RegExp(`(?<=Action Items\n------------\n)((.|\n)*)(?=Action Items,)`); const meetingListRegEx = new RegExp(`(?<=>fedora_coreos_meeting.)(.*?)=?txt`, `g`); - const meetingNotesURL = `https://meetbot-raw.fedoraproject.org/teams/fedora_coreos_meeting/`; - let lastMeetingNotesUrl = `https://meetbot-raw.fedoraproject.org/teams/fedora_coreos_meeting/fedora_coreos_meeting.`; + const meetingNotesURL = core.getInput('rootURLMeetingLogs'); + let lastMeetingNotesUrl = `fedora_coreos_meeting.`; const listOfMeetings = await fetchData(meetingNotesURL); let matches = listOfMeetings.match(meetingListRegEx); if (matches != null) { const lastMeeting = matches[matches.length - 1]; // This should be the latest meeting`s date in with the format of YYYY-MM-DD-HH.MM.txt - lastMeetingNotesUrl = lastMeetingNotesUrl + lastMeeting; - console.debug("last meeting notes url" + lastMeetingNotesUrl); + lastMeetingNotesUrl = meetingNotesURL + lastMeetingNotesUrl + lastMeeting; + console.debug('last meeting notes url' + lastMeetingNotesUrl); const lastMeetingNotes = await fetchData(lastMeetingNotesUrl); const actionItemMatches = actionItemsRegEx.exec(lastMeetingNotes); if (actionItemMatches) { - console.debug("action item matches" + actionItemMatches[0]); + console.debug('action item matches' + actionItemMatches[0]); // if the match is just new lines, then there were no action items if (actionItemMatches[0].match(/^\s*$/)) { return `#topic there are no action items from the last meeting.`; diff --git a/dist/actionItems.js.map b/dist/actionItems.js.map index beb9fcb..4aee93e 100644 --- a/dist/actionItems.js.map +++ b/dist/actionItems.js.map @@ -1 +1 @@ -{"version":3,"file":"actionItems.js","sourceRoot":"","sources":["../src/actionItems.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AACrC,kDAAyB;AAClB,KAAK,UAAU,cAAc;IAClC,IAAI;QACF,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAA;QACrC,gBAAgB;QAChB,MAAM,gBAAgB,GAAG,IAAI,MAAM,CACjC,6DAA6D,CAC9D,CAAA;QACD,MAAM,gBAAgB,GAAG,IAAI,MAAM,CACjC,wCAAwC,EAAC,GAAG,CAC7C,CAAA;QACD,MAAM,eAAe,GACnB,oEAAoE,CAAA;QAEt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C,OAAO,yDAAyD,CAAA;iBACjE;gBACD,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAA;aAC5B;SACF;KACF;IAAC,OAAO,KAAK,EAAE;QACd,2CAA2C;QAC3C,IAAI,KAAK,YAAY,KAAK;YAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KAC1D;IAED,OAAO,4DAA4D,CAAA;AACrE,CAAC;AAvCD,wCAuCC;AAED,KAAK,UAAU,SAAS,CAAC,GAAW;IAClC,MAAM,OAAO,GAAG;QACd,MAAM,EAAE,KAAK;QACb,GAAG;KACJ,CAAA;IACD,OAAO,MAAM,CACX,MAAM,IAAA,eAAK,EAAC,OAAO,CAAC,CACrB,CAAC,IAAI,CAAA;AACR,CAAC"} \ No newline at end of file diff --git a/dist/createIssue.js b/dist/createIssue.js index 9131088..33bb3c7 100644 --- a/dist/createIssue.js +++ b/dist/createIssue.js @@ -26,11 +26,14 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.createThisReposIssue = void 0; const core = __importStar(require("@actions/core")); const octokit_1 = require("octokit"); -async function createThisReposIssue(title, body) { +async function createThisReposIssue(body) { try { const octokit = new octokit_1.Octokit({ auth: process.env.GITHUB_TOKEN }); + // calculate todays date in YYYY-MM-DD format + const today = new Date().toISOString().split('T')[0]; + var title = core.getInput('issueTitle') + ' ' + today; const githubRepository = process.env.GITHUB_REPOSITORY; if (!githubRepository) { throw new Error(`GITHUB_REPOSITORY environment variable is not set`); diff --git a/dist/createIssue.js.map b/dist/createIssue.js.map index b34c454..46266f2 100644 --- a/dist/createIssue.js.map +++ b/dist/createIssue.js.map @@ -1 +1 @@ -{"version":3,"file":"createIssue.js","sourceRoot":"","sources":["../src/createIssue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AACrC,qCAAiC;AAE1B,KAAK,UAAU,oBAAoB,CACxC,KAAa,EACb,IAAY;IAEZ,IAAI;QACF,MAAM,OAAO,GA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C,GAAG,CAAC,iBAAiB,CAAA;QACtD,IAAI,CAAC,gBAAgB,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;SACrE;QACD,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAEjD,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;YAC/B,KAAK;YACL,IAAI;YACJ,KAAK;YACL,IAAI;SACL,CAAC,CAAA;KACH;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAClB,2CAA2C;QAC3C,IAAI,KAAK,YAAY,KAAK;YAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KAC1D;AACH,CAAC;AA3BD,oDA2BC"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 621f9ea..d2400c9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -22832,16 +22832,16 @@ async function GetActionItems() { const meetingNotesURL = core.getInput('rootURLMeetingLogs'); let lastMeetingNotesUrl = `fedora_coreos_meeting.`; const listOfMeetings = await fetchData(meetingNotesURL); - let matches = listOfMeetings.match(meetingListRegEx); + const matches = listOfMeetings.match(meetingListRegEx); if (matches != null) { const lastMeeting = matches[matches.length - 1]; // This should be the latest meeting`s date in with the format of YYYY-MM-DD-HH.MM.txt lastMeetingNotesUrl = meetingNotesURL + lastMeetingNotesUrl + lastMeeting; - console.debug('last meeting notes url' + lastMeetingNotesUrl); + console.debug(`last meeting notes url${lastMeetingNotesUrl}`); const lastMeetingNotes = await fetchData(lastMeetingNotesUrl); const actionItemMatches = actionItemsRegEx.exec(lastMeetingNotes); if (actionItemMatches) { - console.debug('action item matches' + actionItemMatches[0]); + console.debug(`action item matches${actionItemMatches[0]}`); // if the match is just new lines, then there were no action items if (actionItemMatches[0].match(/^\s*$/)) { return `#topic there are no action items from the last meeting.`; @@ -22901,12 +22901,14 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createThisReposIssue = void 0; const core = __importStar(__nccwpck_require__(2186)); const octokit_1 = __nccwpck_require__(7467); -async function createThisReposIssue(title, body) { +async function createThisReposIssue(body) { try { const octokit = new octokit_1.Octokit({ auth: process.env.GITHUB_TOKEN }); - const title = core.getInput('issueTitle'); + // calculate todays date in YYYY-MM-DD format + const today = new Date().toISOString().split('T')[0]; + const title = `${core.getInput('issueTitle')} ${today}`; const githubRepository = process.env.GITHUB_REPOSITORY; if (!githubRepository) { throw new Error(`GITHUB_REPOSITORY environment variable is not set`); @@ -22920,7 +22922,6 @@ async function createThisReposIssue(title, body) { }); } catch (error) { - console.log(error); // Fail the workflow run if an error occurs if (error instanceof Error) core.setFailed(error.message); @@ -22983,7 +22984,7 @@ async function run() { console.log(meetingTopics); const issueBody = hydrateIssueTemplate(actionItems, meetingTopics); console.log('Create issue'); - (0, createIssue_1.createThisReposIssue)('Fedora CoreOS Weekly Meeting', issueBody); + (0, createIssue_1.createThisReposIssue)(issueBody); } catch (error) { // Fail the workflow run if an error occurs @@ -23052,9 +23053,9 @@ async function GetMeetingTopics() { return `#topic No meeting topics found.`; } let issuesToBeDiscussed = ``; - for (let i = 0; i < issues.data.length; i++) { - issuesToBeDiscussed += ` - [ ] \`#topic ${issues.data[i].title}\` \n`; - issuesToBeDiscussed += ` - \`#link ${issues.data[i].html_url}\` \n`; + for (const i of issues.data) { + issuesToBeDiscussed += ` - [ ] \`#topic ${i.title}\` \n`; + issuesToBeDiscussed += ` - \`#link ${i.html_url}\` \n`; } return issuesToBeDiscussed; } diff --git a/dist/main.js b/dist/main.js index 3d0e48b..8ddf87c 100644 --- a/dist/main.js +++ b/dist/main.js @@ -46,7 +46,7 @@ async function run() { console.log(meetingTopics); const issueBody = hydrateIssueTemplate(actionItems, meetingTopics); console.log('Create issue'); - (0, createIssue_1.createThisReposIssue)('Fedora CoreOS Weekly Meeting', issueBody); + (0, createIssue_1.createThisReposIssue)(issueBody); } catch (error) { // Fail the workflow run if an error occurs diff --git a/dist/main.js.map b/dist/main.js.map index 3beebc8..6a2e710 100644 --- a/dist/main.js.map +++ b/dist/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AACrC,+CAA8C;AAC9C,mDAAkD;AAClD,+CAAoD;AACpD,4CAAmB;AAEnB;;;GAGG;AACI,KAAK,UAAU,GAAG;IACvB,IAAI;QACF,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;QAC7B,MAAM,WAAW,GAAG,MAAM,IAAA,4BAAc,GAAE,CAAA;QAC1C,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;QAExB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;QACjC,MAAM,aAAa,GAAG,MAAM,IAAA,gCAAgB,GAAE,CAAA;QAC9C,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;QAE1B,MAAM,SAAS,GAAG,oBAAoB,CAAC,WAAW,EAAE,aAAa,CAAC,CAAA;QAClE,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;QAC3B,IAAA,kCAAoB,EAAC,8BAA8B,EAAE,SAAS,CAAC,CAAA;KAEhE;IAAC,OAAO,KAAK,EAAE;QACd,2CAA2C;QAC3C,IAAI,KAAK,YAAY,KAAK;YAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KAC1D;AACH,CAAC;AAlBD,kBAkBC;AAED,qFAAqF;AACrF,SAAS,oBAAoB,CAC3B,WAAmB,EACnB,aAAqB;IAErB,wBAAwB;IACxB,MAAM,aAAa,GAAG,YAAE,CAAC,YAAY,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAA;IAC7E,OAAO,aAAa;SACjB,OAAO,CAAC,kBAAkB,EAAE,WAAW,CAAC;SACxC,OAAO,CAAC,oBAAoB,EAAE,aAAa,CAAC,CAAA;AACjD,CAAC"} \ No newline at end of file +{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AACrC,+CAA8C;AAC9C,mDAAkD;AAClD,+CAAoD;AACpD,4CAAmB;AAEnB;;;GAGG;AACI,KAAK,UAAU,GAAG;IACvB,IAAI;QACF,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;QAC7B,MAAM,WAAW,GAAG,MAAM,IAAA,4BAAc,GAAE,CAAA;QAC1C,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;QAExB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;QACjC,MAAM,aAAa,GAAG,MAAM,IAAA,gCAAgB,GAAE,CAAA;QAC9C,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;QAE1B,MAAM,SAAS,GAAG,oBAAoB,CAAC,WAAW,EAAE,aAAa,CAAC,CAAA;QAClE,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;QAC3B,IAAA,kCAAoB,EAAC,SAAS,CAAC,CAAA;KAChC;IAAC,OAAO,KAAK,EAAE;QACd,2CAA2C;QAC3C,IAAI,KAAK,YAAY,KAAK;YAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KAC1D;AACH,CAAC;AAjBD,kBAiBC;AAED,qFAAqF;AACrF,SAAS,oBAAoB,CAC3B,WAAmB,EACnB,aAAqB;IAErB,wBAAwB;IACxB,MAAM,aAAa,GAAG,YAAE,CAAC,YAAY,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAA;IAC7E,OAAO,aAAa;SACjB,OAAO,CAAC,kBAAkB,EAAE,WAAW,CAAC;SACxC,OAAO,CAAC,oBAAoB,EAAE,aAAa,CAAC,CAAA;AACjD,CAAC"} \ No newline at end of file diff --git a/dist/meetingTopics.js b/dist/meetingTopics.js index 92c4856..9a8dd71 100644 --- a/dist/meetingTopics.js +++ b/dist/meetingTopics.js @@ -31,9 +31,10 @@ async function GetMeetingTopics() { const octokit = new rest_1.Octokit({ auth: process.env.GITHUB_TOKEN }); + const [owner, repo] = core.getInput('trackingRepo').split(`/`); const issues = await octokit.issues.listForRepo({ - owner: `coreos`, - repo: `fedora-coreos-tracker`, + owner, + repo, labels: `meeting`, state: `open` }); diff --git a/dist/meetingTopics.js.map b/dist/meetingTopics.js.map index 9bed119..58ac84b 100644 --- a/dist/meetingTopics.js.map +++ b/dist/meetingTopics.js.map @@ -1 +1 @@ -{"version":3,"file":"meetingTopics.js","sourceRoot":"","sources":["../src/meetingTopics.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AACrC,wCAAuC;AAChC,KAAK,UAAU,gBAAgB;IACpC,IAAI;QACF,MAAM,OAAO,GAAG,IAAI,cAAO,CAAC;YAC1B,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY;SAC/B,CAAC,CAAA;QAEF,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC;YAC9C,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,uBAAuB;YAC7B,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,MAAM;SACd,CAAC,CAAA;QACF,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,OAAO,iCAAiC,CAAA;SACzC;QAED,IAAI,mBAAmB,GAAG,EAAE,CAAA;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC3C,mBAAmB,IAAI,sBAAsB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAA;YACzE,mBAAmB,IAAI,qBAAq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AAI,CAAC,CAAC,CAAC,CAAC,QAAQ,QAAQ,CAAA;SAC5E;QACD,OAAO,mBAAmB,CAAA;KAC3B;IAAC,OAAO,KAAK,EAAE;QACd,2CAA2C;QAC3C,IAAI,KAAK,YAAY,KAAK;YAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KAC1D;IACD,OAAO,8DAA8D,CAAA;AACvE,CAAC;AA5BD,4CA4BC"} \ No newline at end of file diff --git a/package.json b/package.json index ef7ed73..6846ad6 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "format:write": "prettier --write **/*.ts", "format:check": "prettier --check **/*.ts", "lint": "npx eslint . -c ./.github/linters/.eslintrc.yml", + "lint:fix": "npx eslint . -c ./.github/linters/.eslintrc.yml --fix", "package": "ncc build src/index.ts --license licenses.txt", "package:watch": "npm run package -- --watch", "test": "(jest && make-coverage-badge --output-path ./badges/coverage.svg) || make-coverage-badge --output-path ./badges/coverage.svg", diff --git a/src/actionItems.ts b/src/actionItems.ts index 9ab48fa..d1bbe22 100644 --- a/src/actionItems.ts +++ b/src/actionItems.ts @@ -14,18 +14,18 @@ export async function GetActionItems(): Promise { const meetingNotesURL = core.getInput('rootURLMeetingLogs') let lastMeetingNotesUrl = `fedora_coreos_meeting.` const listOfMeetings = await fetchData(meetingNotesURL) - let matches = listOfMeetings.match(meetingListRegEx) + const matches = listOfMeetings.match(meetingListRegEx) if (matches != null) { const lastMeeting = matches[matches.length - 1] // This should be the latest meeting`s date in with the format of YYYY-MM-DD-HH.MM.txt lastMeetingNotesUrl = meetingNotesURL + lastMeetingNotesUrl + lastMeeting - console.debug('last meeting notes url' + lastMeetingNotesUrl) + console.debug(`last meeting notes url${lastMeetingNotesUrl}`) const lastMeetingNotes = await fetchData(lastMeetingNotesUrl) const actionItemMatches = actionItemsRegEx.exec(lastMeetingNotes) if (actionItemMatches) { - console.debug('action item matches' + actionItemMatches[0]) + console.debug(`action item matches${actionItemMatches[0]}`) // if the match is just new lines, then there were no action items if (actionItemMatches[0].match(/^\s*$/)) { return `#topic there are no action items from the last meeting.` diff --git a/src/createIssue.ts b/src/createIssue.ts index a5e5184..ec765a5 100644 --- a/src/createIssue.ts +++ b/src/createIssue.ts @@ -1,15 +1,14 @@ import * as core from '@actions/core' import { Octokit } from 'octokit' -export async function createThisReposIssue( - title: string, - body: string -): Promise { +export async function createThisReposIssue(body: string): Promise { try { const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN }) - const title = core.getInput('issueTitle') + // calculate todays date in YYYY-MM-DD format + const today = new Date().toISOString().split('T')[0] + const title = `${core.getInput('issueTitle')} ${today}` const githubRepository = process.env.GITHUB_REPOSITORY if (!githubRepository) { throw new Error(`GITHUB_REPOSITORY environment variable is not set`) @@ -23,7 +22,6 @@ export async function createThisReposIssue( body }) } catch (error) { - console.log(error) // Fail the workflow run if an error occurs if (error instanceof Error) core.setFailed(error.message) } diff --git a/src/main.ts b/src/main.ts index d62ec03..9ddeef7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -20,7 +20,7 @@ export async function run(): Promise { const issueBody = hydrateIssueTemplate(actionItems, meetingTopics) console.log('Create issue') - createThisReposIssue('Fedora CoreOS Weekly Meeting', issueBody) + createThisReposIssue(issueBody) } catch (error) { // Fail the workflow run if an error occurs if (error instanceof Error) core.setFailed(error.message) diff --git a/src/meetingTopics.ts b/src/meetingTopics.ts index cedd9d9..f5b7ac6 100644 --- a/src/meetingTopics.ts +++ b/src/meetingTopics.ts @@ -18,9 +18,9 @@ export async function GetMeetingTopics(): Promise { } let issuesToBeDiscussed = `` - for (let i = 0; i < issues.data.length; i++) { - issuesToBeDiscussed += ` - [ ] \`#topic ${issues.data[i].title}\` \n` - issuesToBeDiscussed += ` - \`#link ${issues.data[i].html_url}\` \n` + for (const i of issues.data) { + issuesToBeDiscussed += ` - [ ] \`#topic ${i.title}\` \n` + issuesToBeDiscussed += ` - \`#link ${i.html_url}\` \n` } return issuesToBeDiscussed } catch (error) { diff --git a/static/meeting-template.md b/static/meeting-template.md index a5ae771..4e2046d 100644 --- a/static/meeting-template.md +++ b/static/meeting-template.md @@ -1,7 +1,8 @@ # FCOS-Meeting ## Meeting Notes -The meeting is held every week, meetings are at `16:30 UTC` on Wednesdays. The meeting is held in #fedora-meeting-1 on libera.chat. The meeting is logged and the logs are available at https://meetbot.fedoraproject.org/teams/fedora_coreos_meeting/ + +The meeting is held every week, meetings are at `16:30 UTC` on Wednesdays. The meeting is held in #fedora-meeting-1 on libera.chat. The meeting is logged and the logs are available [here](https://meetbot.fedoraproject.org/teams/fedora_coreos_meeting/) ### Required Concepts @@ -41,7 +42,7 @@ pass by a simple majority of those voting. ## For Urgent Ad-Hoc Votes -- All ad-hoc votes will be held via tracker issues in the fedora-coreos-tracker repo. +- All ad-hoc votes will be held via tracker issues in the fedora-coreos-tracker repository. - Ad-hoc votes must be announced on the current primary mailing list for Fedora CoreOS. - Ad-Hoc votes must be open for at least three hours after the announcement. @@ -50,6 +51,7 @@ At least 5 people must vote, or 51% of the WG membership, whichever is less. Vot ## Meeting Steps + 1. Join channel #fedora-meeting-1 on libera.chat copy these commands and paste them in the channel - [ ] `#startmeeting fedora_coreos_meeting` @@ -58,7 +60,8 @@ At least 5 people must vote, or 51% of the WG membership, whichever is less. Vot 2. Switch to channel #fedora-coreos on libera.chat - [ ] Copy the following notification and post it - ``` + + ```text aaradhak anthr76 apiaseck davdunc dustymabe gursewak jaimelm jbrooks jcajka jdoss jlebon jmarrero lorbus miabbott nasirhm quentin9696[m] ravanelli saqali walters FCOS community meeting in #fedora-meeting-1 If you don't want to be pinged remove your name from this file: https://github.com/coreos/fedora-coreos-tracker/blob/main/issue_template/meeting-template.md @@ -75,7 +78,7 @@ At least 5 people must vote, or 51% of the WG membership, whichever is less. Vot 5. After the Action items are covered start the topics from the tracker - - [ ] Cover the below topics from the tracker repo + - [ ] Cover the below topics from the tracker repository {{meeting-topics}} 6. Once all the topics are covered start the open floor @@ -95,15 +98,15 @@ At least 5 people must vote, or 51% of the WG membership, whichever is less. Vot 2. Email a meeting summary - - [ ] to: coreos@lists.fedoraproject.org + - [ ] to: `coreos@lists.fedoraproject.org` - [ ] subject: Fedora CoreOS Community Meeting Minutes YYYY-MM-DD - - [ ] cc: devel@lists.fedoraproject.org + - [ ] cc: `devel@lists.fedoraproject.org` - [ ] The body of the email is two parts - [ ] Header 1. Copy and paste the following - ``` + ```text Minutes: .html Minutes (text): .txt Log: .log.html @@ -119,7 +122,8 @@ At least 5 people must vote, or 51% of the WG membership, whichever is less. Vot - [ ] category: `Project Discussion` - [ ] tags: `coreos-wg` - [ ] In the terminal Copy and paste the following - ``` + + ```bash fcosmeetinghtml() { local url=$1 # we'll substitute in using the non-raw url for nice highlighting of line numbers @@ -137,4 +141,5 @@ At least 5 people must vote, or 51% of the WG membership, whichever is less. Vot ``` - [ ] In the terminal run `fcosmeetinghtml .html` - - [ ] Copy and paste the output into the post body \ No newline at end of file + - [ ] Copy and paste the output into the post body + \ No newline at end of file