Skip to content

Commit 886723e

Browse files
fix(docs): update readme w/ template inputs (#208)
* update readme w/ template inputs * fix(docs): added meeting link shorthand to docs --------- Co-authored-by: Wes Todd <[email protected]>
1 parent 3b2004a commit 886723e

File tree

1 file changed

+67
-16
lines changed

1 file changed

+67
-16
lines changed

README.md

Lines changed: 67 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ jobs:
2626
- uses: pkgjs/meet@v0
2727
with:
2828
token: ${{ secrets.GITHUB_TOKEN }}
29-
schedules: 2020-04-02T17:00:00.0Z/P1D
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
3031
```
3132
32-
### Inputs
33+
### Github Action Inputs
3334
3435
The meeting schedule, issue, etc can be configured with inputs to this action.
3536
@@ -87,29 +88,79 @@ If you don't want to use the default issue template, you can use a custom issue
8788

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

90-
#### Shorthand in Your Custom Meeting Templates
91+
## Template Data and Automatic Replacements
9192

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

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

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

99+
- **`<!-- title -->`**: The issue's title.
100+
- **`<!-- agenda label -->`**: The label for agenda items to be pulled from that you've defined in the Action's YAML configuration.
101+
- **`<!-- invitees -->`**: The list of invitees you've defined in the Action's YAML configuration.
102+
- **`<!-- observers -->`**: The list of observers you've defined in the Action's YAML configuration.
103+
- **`<!-- meeting link -->`**: The meeting video call link
104+
105+
```md
106+
## Title
107+
<!-- title -->
108+
109+
## Agenda Items
110+
Extracted from issues labeled with <!-- agenda label -->.
111+
112+
## Participants
113+
- Invitees: <!-- invitees -->
114+
- Observers: <!-- observers -->
115+
```
116+
109117
#### JavaScript in Your Custom Meeting Templates
110118

111119
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.
112120

121+
When using EJS templates for your meeting issues, the following data properties are available:
122+
123+
#### EJS Template Data
124+
125+
- **`date`**: `DateTime` - The date of the meeting, formatted using Luxon.
126+
- **`agendaIssues`**: `Array<Object>` - A list of agenda issues, each with properties like:
127+
- `title`: `string` - The title of the agenda issue.
128+
- `number`: `number` - The issue number.
129+
- `html_url`: `string` - The URL to the issue on GitHub.
130+
- **`agendaLabel`**: `string` - The label used to identify agenda items.
131+
- **`meetingNotes`**: `string` - A link or content for meeting notes.
132+
- **`owner`**: `string` - The GitHub repository owner.
133+
- **`repo`**: `string` - The GitHub repository name.
134+
- **`title`**: `string` - The title of the issue, which can be dynamically generated.
135+
- **`invitees`**: `Array<string>` - A list of invitees, if provided.
136+
- **`observers`**: `Array<string>` - A list of observers, if provided.
137+
138+
```ejs
139+
<% const timezones = [
140+
'America/Los_Angeles',
141+
'Asia/Tokyo',
142+
]; %>
143+
144+
# <%= title %>
145+
146+
## Date/Time
147+
| Timezone | Date/Time |
148+
|----------|-----------|
149+
<% timezones.forEach(zone => { %>
150+
| <%= zone %> | <%= date.setZone(zone).toFormat('EEE dd-MMM-yyyy HH:mm (hh:mm a)') %> |
151+
<% }) %>
152+
153+
## Agenda
154+
Extracted from **<%= agendaLabel %>** labeled issues and pull requests from **<%= owner %>/<%= repo %>**.
155+
156+
<% agendaIssues.forEach(issue => { %>
157+
- <%= issue.title %> [#<%= issue.number %>](<%= issue.html_url %>)
158+
<% }) %>
159+
160+
## Meeting Notes
161+
<%= meetingNotes || 'No notes available.' %>
162+
```
163+
113164
### JS API Usage
114165

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

0 commit comments

Comments
 (0)