From 90c2d8ccd8a499096c4b2073f7cabfa331ef6363 Mon Sep 17 00:00:00 2001 From: Steven Presti Date: Fri, 27 Oct 2023 13:18:05 -0400 Subject: [PATCH] eslint: remove linting warnings/errors --- .github/workflows/linter.yml | 1 + README.md | 14 +++++++++----- dist/index.js | 14 +++++++------- package.json | 1 + src/actionItems.ts | 6 +++--- src/createIssue.ts | 2 +- src/meetingTopics.ts | 6 +++--- static/meeting-template.md | 4 +++- 8 files changed, 28 insertions(+), 20 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 8c4daf6..728551b 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -42,3 +42,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TYPESCRIPT_DEFAULT_STYLE: prettier VALIDATE_JSCPD: false + VALIDATE_MARKDOWN: false diff --git a/README.md b/README.md index 2f2e03a..95eb1cc 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# FCOS-Meeting-Action + 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. 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). @@ -5,26 +7,28 @@ The meeting notes are formed from three major parts. The first part is the [meet 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. + 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 + +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/index.js b/dist/index.js index 9a73ec5..d7b747d 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.`; @@ -22908,7 +22908,7 @@ async function createThisReposIssue(body) { }); // calculate todays date in YYYY-MM-DD format const today = new Date().toISOString().split('T')[0]; - var title = core.getInput('issueTitle') + ' ' + today; + const title = `${core.getInput('issueTitle')} ${today}`; const githubRepository = process.env.GITHUB_REPOSITORY; if (!githubRepository) { throw new Error(`GITHUB_REPOSITORY environment variable is not set`); @@ -23054,9 +23054,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 (var i of issues.data) { + issuesToBeDiscussed += ` - [ ] \`#topic ${i.title}\` \n`; + issuesToBeDiscussed += ` - \`#link ${i.html_url}\` \n`; } return issuesToBeDiscussed; } 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 37f4891..f66add6 100644 --- a/src/createIssue.ts +++ b/src/createIssue.ts @@ -8,7 +8,7 @@ export async function createThisReposIssue(body: string): Promise { }) // calculate todays date in YYYY-MM-DD format const today = new Date().toISOString().split('T')[0] - var title = core.getInput('issueTitle') + ' ' + today + const 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/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..95df7c4 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 @@ -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`