Skip to content

Commit

Permalink
feat: change labels to meetingLabels for clarity (#39)
Browse files Browse the repository at this point in the history
* chore: clean up variables in run.js

* chore: rename `labels` to meetingLabel

* test: fix incorrect meetingLabel check

* test: fix missing `,`

* chore: change to `meetingLabels` and clean up API usage
  • Loading branch information
bnb authored Nov 19, 2020
1 parent 6d25454 commit a19dcfb
Show file tree
Hide file tree
Showing 8 changed files with 3,498 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
schedules: 2020-04-02T17:00:00.0Z/P1D
issueTitle: 'Test Meeting <%= date.toFormat("yyyy-MM-dd") %>'
createWithin: P2D
labels: meeting, test
meetingLabels: testMeeting, test
agendaLabel: meeting-agenda-test
createNotes: true
- name: clean up issue
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ 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`
- `labels`: Labels to create the issue with. Default: `meeting`
- `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`
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ inputs:
description: 'Defines when the meeting issues are created using ISO-8601 durations. Defaults to one week before the meeting (Using the ISO-8601 durations format, this is P7D).'
default: 'P7D'
required: false
labels:
description: 'The labels to apply to meeting issues. Defaults to "meeting".'
meetingLabels:
description: 'The labels to apply to issues generated by this GitHub Action for meetings. Default: "meeting"'
default: 'meeting'
required: false
agendaLabel:
Expand Down
4 changes: 2 additions & 2 deletions lib/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports.create = async function (client, issue) {
repo: issue.repo,
title: issue.title,
body: issue.body,
labels: issue.labels
labels: issue.meetingLabels
})

return resp
Expand All @@ -28,7 +28,7 @@ module.exports.getMeetingIssues = async function (client, opts) {
owner: opts.owner,
repo: opts.repo,
state: 'open',
labels: opts.labels
labels: opts.meetingLabels
})

return resp.data
Expand Down
4 changes: 2 additions & 2 deletions lib/meetings.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function getNextIssue (client, opts) {
date,
agendaLabel: opts.agendaLabel,
agendaIssues: opts.agendaIssues,
labels: opts.labels,
labels: opts.meetingLabels,
meetingNotes: opts.meetingNotes || '',
issue_number: (opts.issue || {}).number || null,
body: ''
Expand All @@ -51,7 +51,7 @@ const shouldCreateNextMeetingIssue = module.exports.shouldCreateNextMeetingIssue
const meetings = await issues.getMeetingIssues(client, {
owner: opts.owner,
repo: opts.repo,
label: opts.labels
label: opts.meetingLabels
})

const shouldCreate = !meetings.find((i) => {
Expand Down
Loading

0 comments on commit a19dcfb

Please sign in to comment.