Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add meeting link option #207

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/meeting.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ Extracted from **<%= agendaLabel %>** labelled issues and pull requests from **<

### Joining the meeting

* link for participants:
* link for participants: <%= meetingLink %>
* For those who just want to watch:
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
createWithin: P2D
meetingLabels: test
agendaLabel: meeting-agenda-test
meetingLink: https://github.com/pkgjs/meet
createNotes: true
repos: pkgjs/meet,pkgjs/meet
orgs: pkgjs
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ inputs:
description: 'The labels to apply to issues generated by this GitHub Action for meetings. Default: "meeting"'
default: 'meeting'
required: false
meetingLink:
description: 'An optional meeting join link'
required: false
agendaLabel:
description: 'The label used to identify agenda items within the same repository. Default: "meeting-agenda"'
default: 'meeting-agenda'
Expand Down
9 changes: 6 additions & 3 deletions lib/conversions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const inputs = {
title: core.getInput('issueTitle'),
agendaLabel: core.getInput('agendaLabel'),
invitees: core.getInput('invitees'),
observers: core.getInput('observers')
observers: core.getInput('observers'),
meetingLink: core.getInput('meetingLink')
}

// template keys and values that we automagically replace in
Expand All @@ -15,13 +16,15 @@ const templates = {
title: '<!-- title -->',
agendaLabel: '<!-- agenda label -->',
invitees: '<!-- invitees -->',
observers: '<!-- observers -->'
observers: '<!-- observers -->',
meetingLink: '<!-- meeting link -->'
},
values: {
title: inputs.issueTitle,
agendaLabel: inputs.agendaLabel,
invitees: inputs.invitees,
observers: inputs.observers
observers: inputs.observers,
meetingLink: inputs.meetingLink
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/default-template.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

module.exports = ({ date, agendaIssues, agendaLabel, meetingNotes, owner, repo }) => {
module.exports = ({ date, agendaIssues, agendaLabel, meetingNotes, owner, repo, meetingLink }) => {
return `
## Date/Time

Expand Down Expand Up @@ -39,6 +39,6 @@ ${agendaIssues.map((i) => {

### Joining the meeting

* link for participants:
* link for participants: ${meetingLink || ''}
* For those who just want to watch:`
}
1 change: 1 addition & 0 deletions lib/meetings.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function getNextIssue (opts) {
date,
agendaLabel: opts.agendaLabel,
agendaIssues: opts.agendaIssues,
meetingLink: opts.meetingLink,
labels: opts.meetingLabels,
meetingNotes: opts.meetingNotes || '',
issue_number: (opts.issue || {}).number || null,
Expand Down
3 changes: 3 additions & 0 deletions run.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const pkg = require('./package.json')
const createNotes = core.getInput('createNotes')
const notesUserTemplate = core.getInput('notesTemplate')

const meetingLink = core.getInput('meetingLink')

// Get list of repos
let repos = core.getInput('repos')
const repo = github.context.repo
Expand Down Expand Up @@ -115,6 +117,7 @@ const pkg = require('./package.json')
meetingLabels,
createWithin,
agendaLabel,
meetingLink,
agendaIssues,
issueTitle: titleTemplate
}
Expand Down