Skip to content
Merged
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
83 changes: 67 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ jobs:
- uses: pkgjs/meet@v0
with:
token: ${{ secrets.GITHUB_TOKEN }}
schedules: 2020-04-02T17:00:00.0Z/P1D
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
```

### Inputs
### Github Action Inputs

The meeting schedule, issue, etc can be configured with inputs to this action.

Expand Down Expand Up @@ -87,29 +88,79 @@ If you don't want to use the default issue template, you can use a custom issue

You can use both our shorthand and JavaScript in your meeting templates.

#### Shorthand in Your Custom Meeting Templates
## Template Data and Automatic Replacements

We provide some shorthand that you can use in your meeting templates. We'll automatically replace the shorthand with the relevant dynamic information.
#### Autoreplacing Shorthand in Custom Meeting Templates

- Title:
- Shorthand: `<!-- title -->`
- Result: The issue's title.
- Agenda Label:
- Shorthand: `<!-- agenda label -->`
- Result: The label for agenda items to be pulled from that you've defined in the Action's YAML configuration.
- Invitees:
- Shorthand: `<!-- invitees -->`
- Result: The list of invitees you've defined in the Action's YAML configuration.
- Observers:
- Shorthand: `<!-- observers -->`
- Result: The list of observers you've defined in the Action's YAML configuration.
We provide some shorthand that you can use in your meeting templates. We'll automatically replace the shorthand with the relevant dynamic information.

If you'd like to see more shorthand available, we absolutely welcome PRs.

- **`<!-- title -->`**: The issue's title.
- **`<!-- agenda label -->`**: The label for agenda items to be pulled from that you've defined in the Action's YAML configuration.
- **`<!-- invitees -->`**: The list of invitees you've defined in the Action's YAML configuration.
- **`<!-- observers -->`**: The list of observers you've defined in the Action's YAML configuration.
- **`<!-- meeting link -->`**: The meeting video call link

```md
## Title
<!-- title -->

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

## Participants
- Invitees: <!-- invitees -->
- Observers: <!-- observers -->
```

#### JavaScript in Your Custom Meeting Templates

You can include custom JavaScript in your custom meeting templates. We use [ejs](https://ejs.co/), so anything within an ejs tag will be parsed as JavaScript.

When using EJS templates for your meeting issues, the following data properties are available:

#### EJS Template Data

- **`date`**: `DateTime` - The date of the meeting, formatted using Luxon.
- **`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.
- `html_url`: `string` - The URL to the issue on GitHub.
- **`agendaLabel`**: `string` - The label used to identify agenda items.
- **`meetingNotes`**: `string` - A link or content for meeting notes.
- **`owner`**: `string` - The GitHub repository owner.
- **`repo`**: `string` - The GitHub repository name.
- **`title`**: `string` - The title of the issue, which can be dynamically generated.
- **`invitees`**: `Array<string>` - A list of invitees, if provided.
- **`observers`**: `Array<string>` - A list of observers, if provided.

```ejs
<% const timezones = [
'America/Los_Angeles',
'Asia/Tokyo',
]; %>

# <%= title %>

## Date/Time
| Timezone | Date/Time |
|----------|-----------|
<% timezones.forEach(zone => { %>
| <%= zone %> | <%= date.setZone(zone).toFormat('EEE dd-MMM-yyyy HH:mm (hh:mm a)') %> |
<% }) %>

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

<% agendaIssues.forEach(issue => { %>
- <%= issue.title %> [#<%= issue.number %>](<%= issue.html_url %>)
<% }) %>

## Meeting Notes
<%= meetingNotes || 'No notes available.' %>
```

### JS API Usage

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