Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions .github/ISSUE_TEMPLATE/meeting.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
## Date/Time

| Timezone | Date/Time |
|----------|-----------|
<%= [
<% const timezones = [
'America/Los_Angeles',
'America/Denver',
'America/Chicago',
Expand All @@ -14,7 +10,13 @@
'Asia/Shanghai',
'Asia/Tokyo',
'Australia/Sydney'
].map((zone) => {
]; %>

## Date/Time

| Timezone | Date/Time |
|----------|-----------|
<%= timezones.map((zone) => {
const zonedDate = date.toZonedDateTimeISO(zone)
const formatter = new Intl.DateTimeFormat('en-US', {
weekday: 'short',
Expand All @@ -31,21 +33,30 @@
}).join('\n') %>

Or in your local time:

* https://www.timeanddate.com/worldclock/?iso=<%= date.toZonedDateTimeISO('UTC').toPlainDateTime().toString() %>

## Agenda

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

<%= agendaIssues.map((i) => {
return `* ${i.title} [#${i.number}](${i.html_url})`
return `* ${i.html_url}`
}).join('\n') %>

## Links

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

### Joining the meeting
## Joining the meeting

* link for participants: <%= meetingLink %>
* For those who just want to watch:

---

Please use the following emoji reactions in this post to indicate your
availability.

* 👍 - Attending
* 👎 - Not attending
* 😕 - Not sure yet
82 changes: 59 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
# Schedule regularly occuring meetings via GitHub Issue
# Schedule regularly occurring meetings via GitHub Issue

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

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

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).


## Usage

```yaml
name: Schedule team meetings
on:
schedule:
- cron: '0 0 * * * *'
- cron: '0 0 * * * *' # Run daily at midnight UTC
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: pkgjs/meet@v0
- uses: pkgjs/meet@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
schedules: 2020-04-02T17:00:00.0Z/P1D # Every 1 day from 2020-04-02 at 5PM UTC
createWithin: P2D # Create issue 2 days before the scheduled meeting
schedules: 2020-04-02T17:00:00[America/Chicago]/P1D # Every 1 day from 2020-04-02 at 5PM Chicago time
createWithin: P2D # Create issue 2 days before the scheduled meeting
```

### Github Action Inputs
Expand All @@ -39,7 +34,7 @@ The meeting schedule, issue, etc can be configured with inputs to this action.
- `createWithin`: (required) The ISO-8601 duration for how soon before the meeting to create the issue. Default `P7D`
- `meetingLabels`: The labels to apply to issues generated by this GitHub Action for meetings. Default: `meeting`
- `agendaLabel`: Label to pull the agenda from. Default: `meeting-agenda`
- `issueTitle`: Template string for issue title. Default: `Meeting <%= date.toFormat('yyyy-MM-dd') %>`
- `issueTitle`: Template string for issue title. Default: `Meeting <%= date.toZonedDateTimeISO('UTC').toPlainDate().toString() %>`
- `issueTemplate`: The name of the issue template found in `.github/ISSUE_TEMPLATE`. Default: `meeting.md`

### Schedule format
Expand Down Expand Up @@ -107,7 +102,7 @@ If you'd like to see more shorthand available, we absolutely welcome PRs.
<!-- title -->

## Agenda Items
Extracted from issues labeled with <!-- agenda label -->.
Extracted from issues labelled with <!-- agenda label -->.

## Participants
- Invitees: <!-- invitees -->
Expand All @@ -122,7 +117,7 @@ When using EJS templates for your meeting issues, the following data properties

#### EJS Template Data

- **`date`**: `DateTime` - The date of the meeting, formatted using Luxon.
- **`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.
- **`agendaIssues`**: `Array<Object>` - A list of agenda issues, each with properties like:
- `title`: `string` - The title of the agenda issue.
- `number`: `number` - The issue number.
Expand All @@ -138,34 +133,75 @@ When using EJS templates for your meeting issues, the following data properties
```ejs
<% const timezones = [
'America/Los_Angeles',
'America/Denver',
'America/Chicago',
'America/New_York',
'Europe/London',
'Europe/Amsterdam',
'Europe/Moscow',
'Asia/Kolkata',
'Asia/Shanghai',
'Asia/Tokyo',
'Australia/Sydney'
]; %>

# <%= title %>

## Date/Time

| Timezone | Date/Time |
|----------|-----------|
<% timezones.forEach(zone => { %>
| <%= zone %> | <%= date.setZone(zone).toFormat('EEE dd-MMM-yyyy HH:mm (hh:mm a)') %> |
<% }) %>
<%= timezones.map((zone) => {
const zonedDate = date.toZonedDateTimeISO(zone)
const formatter = new Intl.DateTimeFormat('en-US', {
weekday: 'short',
month: 'short',
day: '2-digit',
year: 'numeric',
hour: '2-digit',
minute: '2-digit',
hour12: true,
timeZone: zone
})
const formattedDate = formatter.format(new Date(zonedDate.epochMilliseconds))
return `| ${zone} | ${formattedDate} |`
}).join('\n') %>

Or in your local time:

* https://www.timeanddate.com/worldclock/?iso=<%= date.toZonedDateTimeISO('UTC').toPlainDateTime().toString() %>

## Agenda
Extracted from **<%= agendaLabel %>** labeled issues and pull requests from **<%= owner %>/<%= repo %>**.

<% agendaIssues.forEach(issue => { %>
- <%= issue.title %> [#<%= issue.number %>](<%= issue.html_url %>)
<% }) %>
Extracted from **<%= agendaLabel %>** labelled issues and pull requests from **<%= owner %>/<%= repo %>** prior to the meeting.

<%= agendaIssues.map((i) => {
return `* ${i.html_url}`
}).join('\n') %>

## Links

## Meeting Notes
<%= meetingNotes || 'No notes available.' %>
* Minutes: <%= meetingNotes || '' %>

## Joining the meeting

* link for participants: <%= meetingLink %>

---

Please use the following emoji reactions in this post to indicate your
availability.

* 👍 - Attending
* 👎 - Not attending
* 😕 - Not sure yet
```

### JS API Usage

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

```
```sh
$ npm i @pkgjs/meet
```

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ inputs:
required: false
issueTitle:
description: 'A title to be used when creating meeting issues.'
default: 'Meeting <%= date.toFormat("yyyy-MM-dd") %>'
default: 'Meeting <%= date.toZonedDateTimeISO("UTC").toPlainDate().toString() %>'
required: false
issueTemplate:
description: 'A name of an issue template (found in .github/ISSUE_TEMPLATES)'
Expand Down
2 changes: 1 addition & 1 deletion lib/default-notes-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = ({ agendaIssues, agendaLabel, owner, repo, issue }) => {
*Extracted from **${agendaLabel}** labelled issues and pull requests from the **${owner} org** prior to the meeting.

${agendaIssues.map((i) => {
return `* ${i.title} [#${i.number}](${i.html_url})`
return `* ${i.html_url}`
}).join('\n')}

## Q&A, Other
Expand Down
42 changes: 26 additions & 16 deletions lib/default-template.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
'use strict'

module.exports = ({ date, agendaIssues, agendaLabel, meetingNotes, owner, repo, meetingLink }) => {
const timezones = [
'America/Los_Angeles',
'America/Denver',
'America/Chicago',
'America/New_York',
'Europe/London',
'Europe/Amsterdam',
'Europe/Moscow',
'Asia/Kolkata',
'Asia/Shanghai',
'Asia/Tokyo',
'Australia/Sydney'
]

return `
## Date/Time

| Timezone | Date/Time |
|----------|-----------|
${[
'America/Los_Angeles',
'America/Denver',
'America/Chicago',
'America/New_York',
'Europe/London',
'Europe/Amsterdam',
'Europe/Moscow',
'Asia/Kolkata',
'Asia/Shanghai',
'Asia/Tokyo',
'Australia/Sydney'
].map((zone) => {
${timezones.map((zone) => {
const zonedDate = date.toZonedDateTimeISO(zone)
const formatter = new Intl.DateTimeFormat('en-US', {
weekday: 'short',
Expand All @@ -42,15 +44,23 @@ Or in your local time:
Extracted from **${agendaLabel}** labelled issues and pull requests from **${owner}/${repo}** prior to the meeting.

${agendaIssues.map((i) => {
return `* ${i.title} [#${i.number}](${i.html_url})`
return `* ${i.html_url}`
}).join('\n')}

## Links

* Minutes: ${meetingNotes || ''}

### Joining the meeting
## Joining the meeting

* link for participants: ${meetingLink || ''}
* For those who just want to watch:`

---

Please use the following emoji reactions in this post to indicate your
availability.

* 👍 - Attending
* 👎 - Not attending
* 😕 - Not sure yet`
}
Loading