Skip to content
forked from pkgjs/meet

Create a meeting issue on a schedule

License

Notifications You must be signed in to change notification settings

DerekNonGeneric/meet

 
 

Repository files navigation

Schedule regularly occuring meetings via GitHub Issue

test js-standard-style

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

This repository is managed by the Package Maintenance Working Group, see Governance.

Usage

name: Schedule team meetings
on:
  schedule:
    - cron: '0 0 * * * *'
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: pkgjs/meet@v0
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        schedules: 2020-04-02T17:00:00.0Z/P1D

Inputs

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

  • token: (required) The token from the action for calling to the GitHub API.
  • schedules: (required) The ISO-8601 interval for the schedule. Default: ${now/P7D} seven days from now
  • 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') %>
  • issueTemplate: The name of the issue template found in .github/ISSUE_TEMPLATE. Default: meeting.md

Default Issue Template

The default issue template can be seen in the ISSUE_TEMPLATES directory, as meeting.md. Additionally, you can find example issues of the latest version via the closed issues that are the result of CI tests.

Our default template is based off of the Node.js project's practices around meetings, but changes and enhancements are welcome.

Custom Issue Templates

If you don't want to use the default issue template, you can use a custom issue template by passing in the file name of it (presuming it lives in ISSUE_TEMPLATES).

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

Shorthand in Your Custom Meeting Templates

We provide some shorthand that you can use in your meeting templates. We'll automatically replace the shorthand with the relevant dynamic information.

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

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

JavaScript in Your Custom Meeting Templates

You can include custom JavaScript in your custom meeting templates. We use ejs, so anything within an ejs tag will be parsed as JavaScript.

JS API Usage

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

$ npm i @pkgjs/meet
const maker = require('@pkgjs/meet')

;(async () => {
  const issue = await maker.meetings.createNextMeeting(client, {
    owner: 'pkgjs',
    repo: 'meet',
    schedules: []
  })
  console.log(issue) // the response from the GitHub api creating the issue
})()

Contributing

This package welcomes contributions. While the basic unit tests are runnable (npm t) Unfortunatly because it is requires access to the GitHub api it means you need to have a token with access to create the issues as part of the integration tests. To specify the key you need to create a personal access token and put it in a .env file as GITHUB_TOKEN=<TOKEN>. Then you can run npm run test:integration to run the main integration tests. To be honest this should probably be configurable, contributions welcome.

About

Create a meeting issue on a schedule

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%