diff --git a/.github/linters/.eslintrc.yml b/.github/linters/.eslintrc.yml index f452aba..f8c2b3e 100644 --- a/.github/linters/.eslintrc.yml +++ b/.github/linters/.eslintrc.yml @@ -79,5 +79,6 @@ rules: '@typescript-eslint/semi': ['error', 'never'], '@typescript-eslint/space-before-function-paren': 'off', '@typescript-eslint/type-annotation-spacing': 'error', - '@typescript-eslint/unbound-method': 'error' + '@typescript-eslint/unbound-method': 'error', + 'prefer-template': 'off' } diff --git a/.github/workflows/create-meeting.yml b/.github/workflows/create-meeting.yml index c541a41..964b21e 100644 --- a/.github/workflows/create-meeting.yml +++ b/.github/workflows/create-meeting.yml @@ -34,5 +34,5 @@ jobs: uses: ./ with: issueTitle: 'FCOS Meeting Checklist' - rootURLMeetingLogs: 'https://meetbot-raw.fedoraproject.org/teams/fedora_coreos_meeting/' + rootURLMeetingLogs: 'https://meetbot-raw.fedoraproject.org/meeting-1_matrix_fedoraproject-org/' trackingRepo: 'coreos/fedora-coreos-tracker' diff --git a/dist/index.js b/dist/index.js index d2400c9..459995a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -22828,23 +22828,26 @@ async function GetActionItems() { console.log(`GetActionItems started`); // Set constants const actionItemsRegEx = new RegExp(`(?<=Action Items\n------------\n)((.|\n)*)(?=Action Items,)`); - const meetingListRegEx = new RegExp(`(?<=>fedora_coreos_meeting.)(.*?)=?txt`, `g`); - const meetingNotesURL = core.getInput('rootURLMeetingLogs'); - let lastMeetingNotesUrl = `fedora_coreos_meeting.`; + const meetingListRegEx = new RegExp(`(?<=>fedora-coreos-meeting.)(.*?)=?txt`, `g`); + const allMeetingNotes = core.getInput('rootURLMeetingLogs'); + const sevenDaysAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000) + .toISOString() + .split('T')[0]; + const meetingNotesURL = allMeetingNotes + sevenDaysAgo + `/`; const listOfMeetings = await fetchData(meetingNotesURL); 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}`); + const lastMeetingNotesUrl = meetingNotesURL + 'fedora-coreos-meeting.' + 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]}`); // 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.`; + return `!topic there are no action items from the last meeting.`; } return actionItemMatches[0]; } @@ -23050,12 +23053,12 @@ async function GetMeetingTopics() { state: `open` }); if (issues.data.length === 0) { - return `#topic No meeting topics found.`; + return `!topic No meeting topics found.`; } let issuesToBeDiscussed = ``; for (const i of issues.data) { - issuesToBeDiscussed += ` - [ ] \`#topic ${i.title}\` \n`; - issuesToBeDiscussed += ` - \`#link ${i.html_url}\` \n`; + issuesToBeDiscussed += ` - [ ] \`!topic ${i.title}\` \n`; + issuesToBeDiscussed += ` - \`!link ${i.html_url}\` \n`; } return issuesToBeDiscussed; } diff --git a/src/actionItems.ts b/src/actionItems.ts index d1bbe22..240680b 100644 --- a/src/actionItems.ts +++ b/src/actionItems.ts @@ -8,19 +8,23 @@ export async function GetActionItems(): Promise { `(?<=Action Items\n------------\n)((.|\n)*)(?=Action Items,)` ) const meetingListRegEx = new RegExp( - `(?<=>fedora_coreos_meeting.)(.*?)=?txt`, + `(?<=>fedora-coreos-meeting.)(.*?)=?txt`, `g` ) - const meetingNotesURL = core.getInput('rootURLMeetingLogs') - let lastMeetingNotesUrl = `fedora_coreos_meeting.` + const allMeetingNotes = core.getInput('rootURLMeetingLogs') + const sevenDaysAgo: string = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000) + .toISOString() + .split('T')[0] + const meetingNotesURL = allMeetingNotes + sevenDaysAgo + `/` const listOfMeetings = await fetchData(meetingNotesURL) 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}`) + const lastMeetingNotesUrl = + meetingNotesURL + 'fedora-coreos-meeting.' + lastMeeting + console.debug(`last meeting notes url ${lastMeetingNotesUrl}`) const lastMeetingNotes = await fetchData(lastMeetingNotesUrl) const actionItemMatches = actionItemsRegEx.exec(lastMeetingNotes) @@ -28,7 +32,7 @@ export async function GetActionItems(): Promise { 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.` + return `!topic there are no action items from the last meeting.` } return actionItemMatches[0] } diff --git a/src/meetingTopics.ts b/src/meetingTopics.ts index f5b7ac6..3ee2cc9 100644 --- a/src/meetingTopics.ts +++ b/src/meetingTopics.ts @@ -14,13 +14,13 @@ export async function GetMeetingTopics(): Promise { state: `open` }) if (issues.data.length === 0) { - return `#topic No meeting topics found.` + return `!topic No meeting topics found.` } let issuesToBeDiscussed = `` for (const i of issues.data) { - issuesToBeDiscussed += ` - [ ] \`#topic ${i.title}\` \n` - issuesToBeDiscussed += ` - \`#link ${i.html_url}\` \n` + 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 4e2046d..839a658 100644 --- a/static/meeting-template.md +++ b/static/meeting-template.md @@ -2,7 +2,7 @@ ## 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 [here](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 https://matrix.to/#/#meeting-1:fedoraproject.org on matrix. The meeting is logged and the logs are available [here](https://meetbot.fedoraproject.org/teams/fedora_coreos_meeting/) ### Required Concepts @@ -18,10 +18,10 @@ Please see [meeting-people.txt](https://github.com/coreos/fedora-coreos-tracker/
Meeting host Requirements -The meeting host needs to have IRC configured and setup on their machine. -The host needs to have access to the following channels on libera.chat - - `#fedora-meeting-1` - - `#fedora-coreos` +The meeting host needs to have a matrix account (an example is an account on the [fedora matrix server](https://chat.fedoraproject.org/#/room/#coreos:fedoraproject.org).) +The host needs to have access to the following channels on matrix + - [#coreos:fedoraproject.org](https://matrix.to/#/#coreos:fedoraproject.org) + - [#meeting-1:fedoraproject.org](https://matrix.to/#/#meeting-1:fedoraproject.org) The host needs to have a fedora account and be able to post discussion topics to the [fedora project](https://discussion.fedoraproject.org/tag/coreos-wg)
## For Regularly Scheduled Meetings @@ -52,12 +52,12 @@ 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 +1. Join channel [#coreos:fedoraproject.org](https://matrix.to/#/#coreos:fedoraproject.org) on matrix, copy these commands and paste them in the channel - - [ ] `#startmeeting fedora_coreos_meeting` - - [ ] `#topic roll call` + - [ ] `!startmeeting fedora_coreos_meeting` + - [ ] `!topic roll call` -2. Switch to channel #fedora-coreos on libera.chat +2. Switch to channel [#meeting-1:fedoraproject.org](https://matrix.to/#/#meeting-1:fedoraproject.org) on matrix - [ ] Copy the following notification and post it @@ -67,13 +67,11 @@ At least 5 people must vote, or 51% of the WG membership, whichever is less. Vot 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 ``` -3. Switch back to #fedora-meeting-1 wait for people to join and add each of them as a chair - - - [ ] `#chair ` +3. Switch back to [#meeting-1:fedoraproject.org](https://matrix.to/#/#meeting-1:fedoraproject.org) wait for people to join 4. After 2-4 mins pass start the Action items from last meeting - - [ ] `#topic Action items from last meeting` + - [ ] `!topic Action items from last meeting` - [ ] `{{action-items}}` 5. After the Action items are covered start the topics from the tracker @@ -83,11 +81,11 @@ At least 5 people must vote, or 51% of the WG membership, whichever is less. Vot 6. Once all the topics are covered start the open floor - - [ ] `#topic Open Floor` + - [ ] `!topic Open Floor` 7. Once the time limit is reached or the open floor is quiet end the meeting - - [ ] `#endmeeting` + - [ ] `!endmeeting` ## Housekeeping @@ -122,24 +120,40 @@ 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 - local baseurl=$(dirname $url) - if [[ ! $url =~ raw ]]; then - url=$(echo "$url" | sed "s|meetbot.fedoraproject.org|meetbot-raw.fedoraproject.org|") - fi - # Take the html and delete the contents (doesn't render correctly) - # and also substitute in the base url to make relative URLs absolute. - curl --silent $url | \ - sed -z 's|.*||' | \ - sed "s|href='fedora|href='${baseurl}/fedora|" | \ - sed "s|href=\"fedora|href=\"${baseurl}/fedora|" + SUMMARY_URL="$1" + + # Extract meeting date and time from the summary URL + MEETING_DATE_TIME=$(echo "$SUMMARY_URL" | grep -Eo '[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{2}\.[0-9]{2}') + + # Extract meeting date from the date and time + MEETING_DATE=$(echo "$MEETING_DATE_TIME" | cut -d'-' -f1-3) + + # Generate the log URL based on the meeting date and time + LOG_URL="https://meetbot-raw.fedoraproject.org/meeting-1_matrix_fedoraproject-org/$MEETING_DATE/fedora-coreos-meeting.$MEETING_DATE_TIME.log.html" + + # Extract line numbers and timestamps from the log file + timestamps_and_lines=$(curl -s "$LOG_URL" | grep -Eo '
|
[0-9]{2}:[0-9]{2}:[0-9]{2}
') + + # Generate sed commands to replace timestamps with hyperlinks including line numbers + sed_commands="" + current_line="" + while read -r line; do + if [[ "$line" =~ '