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 eb46b8b..5656b6e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -22828,15 +22828,18 @@ 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; + const lastMeetingNotesUrl = meetingNotesURL + lastMeeting; console.debug(`last meeting notes url${lastMeetingNotesUrl}`); const lastMeetingNotes = await fetchData(lastMeetingNotesUrl); const actionItemMatches = actionItemsRegEx.exec(lastMeetingNotes); diff --git a/src/actionItems.ts b/src/actionItems.ts index c7f2a84..036637d 100644 --- a/src/actionItems.ts +++ b/src/actionItems.ts @@ -8,18 +8,21 @@ 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 + const lastMeetingNotesUrl = meetingNotesURL + lastMeeting console.debug(`last meeting notes url${lastMeetingNotesUrl}`) const lastMeetingNotes = await fetchData(lastMeetingNotesUrl) const actionItemMatches = actionItemsRegEx.exec(lastMeetingNotes)