Skip to content

Commit 8fbf157

Browse files
committed
πŸ“ update and normalize templates, fix date conversions, update readme
1 parent 6a0e663 commit 8fbf157

File tree

5 files changed

+107
-50
lines changed

5 files changed

+107
-50
lines changed

β€Ž.github/ISSUE_TEMPLATE/meeting.mdβ€Ž

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
## Date/Time
2-
3-
| Timezone | Date/Time |
4-
|----------|-----------|
5-
<%= [
1+
<% const timezones = [
62
'America/Los_Angeles',
73
'America/Denver',
84
'America/Chicago',
@@ -14,7 +10,13 @@
1410
'Asia/Shanghai',
1511
'Asia/Tokyo',
1612
'Australia/Sydney'
17-
].map((zone) => {
13+
]; %>
14+
15+
## Date/Time
16+
17+
| Timezone | Date/Time |
18+
|----------|-----------|
19+
<%= timezones.map((zone) => {
1820
const zonedDate = date.toZonedDateTimeISO(zone)
1921
const formatter = new Intl.DateTimeFormat('en-US', {
2022
weekday: 'short',
@@ -31,21 +33,30 @@
3133
}).join('\n') %>
3234

3335
Or in your local time:
36+
3437
* https://www.timeanddate.com/worldclock/?iso=<%= date.toZonedDateTimeISO('UTC').toPlainDateTime().toString() %>
3538

3639
## Agenda
3740

3841
Extracted from **<%= agendaLabel %>** labelled issues and pull requests from **<%= owner %>/<%= repo %>** prior to the meeting.
3942

4043
<%= agendaIssues.map((i) => {
41-
return `* ${i.title} [#${i.number}](${i.html_url})`
44+
return `* ${i.html_url}`
4245
}).join('\n') %>
4346

4447
## Links
4548

4649
* Minutes: <%= meetingNotes || '' %>
4750

48-
### Joining the meeting
51+
## Joining the meeting
4952

5053
* link for participants: <%= meetingLink %>
51-
* For those who just want to watch:
54+
55+
---
56+
57+
Please use the following emoji reactions in this post to indicate your
58+
availability.
59+
60+
* πŸ‘ - Attending
61+
* πŸ‘Ž - Not attending
62+
* πŸ˜• - Not sure yet

β€ŽREADME.mdβ€Ž

Lines changed: 59 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
1-
# Schedule regularly occuring meetings via GitHub Issue
1+
# Schedule regularly occurring meetings via GitHub Issue
22

3-
<!--
4-
[![NPM Version](https://img.shields.io/npm/v/meeting-maker.svg)](https://npmjs.org/package/meeting-maker)
5-
[![NPM Downloads](https://img.shields.io/npm/dm/meeting-maker.svg)](https://npmjs.org/package/meeting-maker)
6-
-->
73
[![test](https://github.com/pkgjs/meet/workflows/test/badge.svg)](https://github.com/pkgjs/meet/actions?query=workflow%3Atest)
84
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/standard/standard)
95

106
Schedule meetings via a GitHub Action. Creates issues based on a schedule and template.
117

128
This repository is managed by the [Package Maintenance Working Group](https://github.com/nodejs/package-maintenance), see [Governance](https://github.com/nodejs/package-maintenance/blob/main/Governance.md).
139

14-
1510
## Usage
1611

1712
```yaml
1813
name: Schedule team meetings
1914
on:
2015
schedule:
21-
- cron: '0 0 * * * *'
16+
- cron: '0 0 * * * *' # Run daily at midnight UTC
2217
jobs:
2318
build:
2419
runs-on: ubuntu-latest
2520
steps:
26-
- uses: pkgjs/meet@v0
21+
- uses: pkgjs/meet@v1
2722
with:
2823
token: ${{ secrets.GITHUB_TOKEN }}
29-
schedules: 2020-04-02T17:00:00.0Z/P1D # Every 1 day from 2020-04-02 at 5PM UTC
30-
createWithin: P2D # Create issue 2 days before the scheduled meeting
24+
schedules: 2020-04-02T17:00:00[America/Chicago]/P1D # Every 1 day from 2020-04-02 at 5PM Chicago time
25+
createWithin: P2D # Create issue 2 days before the scheduled meeting
3126
```
3227
3328
### Github Action Inputs
@@ -39,7 +34,7 @@ The meeting schedule, issue, etc can be configured with inputs to this action.
3934
- `createWithin`: (required) The ISO-8601 duration for how soon before the meeting to create the issue. Default `P7D`
4035
- `meetingLabels`: The labels to apply to issues generated by this GitHub Action for meetings. Default: `meeting`
4136
- `agendaLabel`: Label to pull the agenda from. Default: `meeting-agenda`
42-
- `issueTitle`: Template string for issue title. Default: `Meeting <%= date.toFormat('yyyy-MM-dd') %>`
37+
- `issueTitle`: Template string for issue title. Default: `Meeting <%= date.toZonedDateTimeISO('UTC').toPlainDate().toString() %>`
4338
- `issueTemplate`: The name of the issue template found in `.github/ISSUE_TEMPLATE`. Default: `meeting.md`
4439

4540
### Schedule format
@@ -107,7 +102,7 @@ If you'd like to see more shorthand available, we absolutely welcome PRs.
107102
<!-- title -->
108103
109104
## Agenda Items
110-
Extracted from issues labeled with <!-- agenda label -->.
105+
Extracted from issues labelled with <!-- agenda label -->.
111106
112107
## Participants
113108
- Invitees: <!-- invitees -->
@@ -122,7 +117,7 @@ When using EJS templates for your meeting issues, the following data properties
122117

123118
#### EJS Template Data
124119

125-
- **`date`**: `DateTime` - The date of the meeting, formatted using Luxon.
120+
- **`date`**: `Temporal.Instant` - The date of the meeting, formatted using [Temporal](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal) for timezone conversions and [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) for locale-aware formatting.
126121
- **`agendaIssues`**: `Array<Object>` - A list of agenda issues, each with properties like:
127122
- `title`: `string` - The title of the agenda issue.
128123
- `number`: `number` - The issue number.
@@ -138,34 +133,75 @@ When using EJS templates for your meeting issues, the following data properties
138133
```ejs
139134
<% const timezones = [
140135
'America/Los_Angeles',
136+
'America/Denver',
137+
'America/Chicago',
138+
'America/New_York',
139+
'Europe/London',
140+
'Europe/Amsterdam',
141+
'Europe/Moscow',
142+
'Asia/Kolkata',
143+
'Asia/Shanghai',
141144
'Asia/Tokyo',
145+
'Australia/Sydney'
142146
]; %>
143147
144148
# <%= title %>
145149
146150
## Date/Time
151+
147152
| Timezone | Date/Time |
148153
|----------|-----------|
149-
<% timezones.forEach(zone => { %>
150-
| <%= zone %> | <%= date.setZone(zone).toFormat('EEE dd-MMM-yyyy HH:mm (hh:mm a)') %> |
151-
<% }) %>
154+
<%= timezones.map((zone) => {
155+
const zonedDate = date.toZonedDateTimeISO(zone)
156+
const formatter = new Intl.DateTimeFormat('en-US', {
157+
weekday: 'short',
158+
month: 'short',
159+
day: '2-digit',
160+
year: 'numeric',
161+
hour: '2-digit',
162+
minute: '2-digit',
163+
hour12: true,
164+
timeZone: zone
165+
})
166+
const formattedDate = formatter.format(new Date(zonedDate.epochMilliseconds))
167+
return `| ${zone} | ${formattedDate} |`
168+
}).join('\n') %>
169+
170+
Or in your local time:
171+
172+
* https://www.timeanddate.com/worldclock/?iso=<%= date.toZonedDateTimeISO('UTC').toPlainDateTime().toString() %>
152173
153174
## Agenda
154-
Extracted from **<%= agendaLabel %>** labeled issues and pull requests from **<%= owner %>/<%= repo %>**.
155175
156-
<% agendaIssues.forEach(issue => { %>
157-
- <%= issue.title %> [#<%= issue.number %>](<%= issue.html_url %>)
158-
<% }) %>
176+
Extracted from **<%= agendaLabel %>** labelled issues and pull requests from **<%= owner %>/<%= repo %>** prior to the meeting.
177+
178+
<%= agendaIssues.map((i) => {
179+
return `* ${i.html_url}`
180+
}).join('\n') %>
181+
182+
## Links
159183
160-
## Meeting Notes
161-
<%= meetingNotes || 'No notes available.' %>
184+
* Minutes: <%= meetingNotes || '' %>
185+
186+
## Joining the meeting
187+
188+
* link for participants: <%= meetingLink %>
189+
190+
---
191+
192+
Please use the following emoji reactions in this post to indicate your
193+
availability.
194+
195+
* πŸ‘ - Attending
196+
* πŸ‘Ž - Not attending
197+
* πŸ˜• - Not sure yet
162198
```
163199

164200
### JS API Usage
165201

166202
The main logic of the module is also published to npm.
167203

168-
```
204+
```sh
169205
$ npm i @pkgjs/meet
170206
```
171207

β€Žaction.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ inputs:
2828
required: false
2929
issueTitle:
3030
description: 'A title to be used when creating meeting issues.'
31-
default: 'Meeting <%= date.toFormat("yyyy-MM-dd") %>'
31+
default: 'Meeting <%= date.toZonedDateTimeISO("UTC").toPlainDate().toString() %>'
3232
required: false
3333
issueTemplate:
3434
description: 'A name of an issue template (found in .github/ISSUE_TEMPLATES)'

β€Žlib/default-notes-template.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = ({ agendaIssues, agendaLabel, owner, repo, issue }) => {
2020
*Extracted from **${agendaLabel}** labelled issues and pull requests from the **${owner} org** prior to the meeting.
2121
2222
${agendaIssues.map((i) => {
23-
return `* ${i.title} [#${i.number}](${i.html_url})`
23+
return `* ${i.html_url}`
2424
}).join('\n')}
2525
2626
## Q&A, Other

β€Žlib/default-template.jsβ€Ž

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
'use strict'
22

33
module.exports = ({ date, agendaIssues, agendaLabel, meetingNotes, owner, repo, meetingLink }) => {
4+
const timezones = [
5+
'America/Los_Angeles',
6+
'America/Denver',
7+
'America/Chicago',
8+
'America/New_York',
9+
'Europe/London',
10+
'Europe/Amsterdam',
11+
'Europe/Moscow',
12+
'Asia/Kolkata',
13+
'Asia/Shanghai',
14+
'Asia/Tokyo',
15+
'Australia/Sydney'
16+
]
17+
418
return `
519
## Date/Time
620
721
| Timezone | Date/Time |
822
|----------|-----------|
9-
${[
10-
'America/Los_Angeles',
11-
'America/Denver',
12-
'America/Chicago',
13-
'America/New_York',
14-
'Europe/London',
15-
'Europe/Amsterdam',
16-
'Europe/Moscow',
17-
'Asia/Kolkata',
18-
'Asia/Shanghai',
19-
'Asia/Tokyo',
20-
'Australia/Sydney'
21-
].map((zone) => {
23+
${timezones.map((zone) => {
2224
const zonedDate = date.toZonedDateTimeISO(zone)
2325
const formatter = new Intl.DateTimeFormat('en-US', {
2426
weekday: 'short',
@@ -42,15 +44,23 @@ Or in your local time:
4244
Extracted from **${agendaLabel}** labelled issues and pull requests from **${owner}/${repo}** prior to the meeting.
4345
4446
${agendaIssues.map((i) => {
45-
return `* ${i.title} [#${i.number}](${i.html_url})`
47+
return `* ${i.html_url}`
4648
}).join('\n')}
4749
4850
## Links
4951
5052
* Minutes: ${meetingNotes || ''}
5153
52-
### Joining the meeting
54+
## Joining the meeting
5355
5456
* link for participants: ${meetingLink || ''}
55-
* For those who just want to watch:`
57+
58+
---
59+
60+
Please use the following emoji reactions in this post to indicate your
61+
availability.
62+
63+
* πŸ‘ - Attending
64+
* πŸ‘Ž - Not attending
65+
* πŸ˜• - Not sure yet`
5666
}

0 commit comments

Comments
Β (0)