Skip to content

Commit

Permalink
actionItems: Update action for new file structure
Browse files Browse the repository at this point in the history
With the change over from IRC bot to matrix bot there seems to be
a small structural change in how the logs are hosted.

You can see the following examples
new https://meetbot-raw.fedoraproject.org/meeting-1_matrix_fedoraproject-org/
vs
old https://meetbot-raw.fedoraproject.org/teams/fedora_coreos_meeting/
  • Loading branch information
prestist committed Jan 24, 2024
1 parent 900cb77 commit b1d2ead
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
2 changes: 1 addition & 1 deletion .github/workflows/create-meeting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
13 changes: 8 additions & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions src/actionItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,23 @@ export async function GetActionItems(): Promise<string> {
`(?<=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)

Expand Down

0 comments on commit b1d2ead

Please sign in to comment.