Skip to content

Commit e85a48a

Browse files
committed
update readme w/ template inputs
1 parent 61042a3 commit e85a48a

File tree

1 file changed

+62
-19
lines changed

1 file changed

+62
-19
lines changed

README.md

Lines changed: 62 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ 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
34-
The meeting schedule, issue, etc can be configured with inouts to this action.
35+
The meeting schedule, issue, etc can be configured with inputs to this action.
3536
3637
- `token`: (required) The token from the action for calling to the GitHub API.
3738
- `schedules`: (required) The ISO-8601 interval for the schedule. Default: `${now/P7D}` seven days from now
@@ -54,28 +55,70 @@ If you don't want to use the default issue template, you can use a custom issue
5455

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

57-
#### Shorthand in Your Custom Meeting Templates
58+
## Template Data and Automatic Replacements
5859

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

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

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

76-
#### JavaScript in Your Custom Meeting Templates
66+
- **`<!-- title -->`**: The issue's title.
67+
- **`<!-- agenda label -->`**: The label for agenda items to be pulled from that you've defined in the Action's YAML configuration.
68+
- **`<!-- invitees -->`**: The list of invitees you've defined in the Action's YAML configuration.
69+
- **`<!-- observers -->`**: The list of observers you've defined in the Action's YAML configuration.
70+
71+
```md
72+
## Title
73+
<!-- title -->
74+
75+
## Agenda Items
76+
Extracted from issues labeled with <!-- agenda label -->.
77+
78+
## Participants
79+
- Invitees: <!-- invitees -->
80+
- Observers: <!-- observers -->
81+
```
82+
83+
### Template Data
84+
85+
When using EJS templates for your meeting issues, the following data properties are available:
7786

78-
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.
87+
- **`date`**: The date of the meeting, formatted using Luxon.
88+
- **`agendaIssues`**: A list of agenda issues, each with properties like `title`, `number`, and `html_url`.
89+
- **`agendaLabel`**: The label used to identify agenda items.
90+
- **`meetingNotes`**: A link or content for meeting notes.
91+
- **`owner`**: The GitHub repository owner.
92+
- **`repo`**: The GitHub repository name.
93+
- **`title`**: The title of the issue, which can be dynamically generated.
94+
- **`invitees`**: A list of invitees, if provided.
95+
- **`observers`**: A list of observers, if provided.
96+
97+
```ejs
98+
<% const timezones = [
99+
'America/Los_Angeles',
100+
'Asia/Tokyo',
101+
]; %>
102+
103+
# <%= title %>
104+
105+
## Date/Time
106+
| Timezone | Date/Time |
107+
|----------|-----------|
108+
<% timezones.forEach(zone => { %>
109+
| <%= zone %> | <%= date.setZone(zone).toFormat('EEE dd-MMM-yyyy HH:mm (hh:mm a)') %> |
110+
<% }) %>
111+
112+
## Agenda
113+
Extracted from **<%= agendaLabel %>** labeled issues and pull requests from **<%= owner %>/<%= repo %>**.
114+
115+
<% agendaIssues.forEach(issue => { %>
116+
- <%= issue.title %> [#<%= issue.number %>](<%= issue.html_url %>)
117+
<% }) %>
118+
119+
## Meeting Notes
120+
<%= meetingNotes || 'No notes available.' %>
121+
```
79122

80123
### JS API Usage
81124

0 commit comments

Comments
 (0)