Skip to content

[DO NOT MERGE] add HackMD integration #92

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

Closed
wants to merge 1 commit into from

Conversation

boneskull
Copy link
Member

This PR should allow Node.js groups to manage meeting minutes on HackMD. Instead of a Google Doc, the script will create a document based on the template on HackMD, and use the resulting URL in the GitHub issue associated with the meeting.

To enable this behavior:

  1. Put USE_HACKMD=1 at the top of your group's issue template file (in templates/).
  2. process.env must contain CMD_CLI_ID=<email> where <email> is a HackMD login
  3. process.env must contain CMD_CLI_ID=<password> where <password> is the user's HackMD password

Nuts & bolts:

  • I split create-node-meeting-artifacts.js into several different files, because it was difficult to test
  • The script now either imports lib/google-docs.js or lib/hackmd.js depending on whether USE_HACKMD is present in the template. Both of these export a function upload
  • lib/create-gh-issue.js exports a function which returns a callback. upload is given this callback, since the issue cannot be created until the minutes document has a URL.
  • Added @hackmd/codimd-cli
  • Removed unused google-calendar

This PR should allow Node.js groups to manage meeting minutes on [HackMD](https://hackmd.io).  Instead of a Google Doc, the script will create a document based on the template on HackMD, and use the resulting URL in the GitHub issue associated with the meeting.

To enable this behavior:

1. Put `USE_HACKMD=1` at the top of your group's issue template file (in `templates/`).
2. `process.env` must contain `CMD_CLI_ID=<email>` where `<email>` is a HackMD login
3. `process.env` must contain `CMD_CLI_ID=<password>` where `<password>` is the user's HackMD password

Nuts & bolts:

- I split `create-node-meeting-artifacts.js` into several different files, because it was difficult to test
- The script now either imports `lib/google-docs.js` or `lib/hackmd.js` depending on whether `USE_HACKMD` is present in the template. Both of these export a function `upload`
- `lib/create-gh-issue.js` exports a function which returns a callback.  `upload` is given this callback, since the issue cannot be created until the minutes document has a URL.
- Added [`@hackmd/codimd-cli`](https://npm.im/@hackmd/codimd-cli)
- Removed unused [`google-calendar`](https://npm.im/google-calendar)
@boneskull boneskull marked this pull request as draft April 28, 2020 19:42
@boneskull
Copy link
Member Author

We need the HackMD API to support:

  1. Importing a document directly into a "team". I envision a "Node.js Team", in which all documents from all groups would live.
  2. Documents should be able to be tagged at import time. We can use tags for organization; e.g., the tooling group minutes would have tag tooling, and the TSC might have tsc.

In addition, we will either need everyone who wants to edit these minutes documents to have a HackMD account, or we'll need to set permissions to "world-writable" at import time on the documents.

Ref: hackmdio/api-client#2

@boneskull
Copy link
Member Author

cc @bnb b/c I know he was interested in this.
and cc @jorydotcom because the OJSF might want this too.

@boneskull
Copy link
Member Author

and cc @joesepi for the same reason

@joesepi
Copy link
Member

joesepi commented Apr 28, 2020

I've been wondering about this for a while. Thanks for working on it @boneskull

repo: meetingProperties.REPO.replace(/"/g, ''),
title: title,
body,
assignee: 'mhdawson',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol @mhdawson

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah @mhdawson is the only one who can run this script 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I'm the only one who could, but the setup required is non-trivial to do the first time.

@@ -6,13 +6,12 @@ const child_process = require('child_process');
const GitHubApi = require("github");
const ghauth = require('ghauth');
const parser = require('properties-parser');
const gcal = require('google-calendar');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does removing the gcal integration remove the auto generation based on google calendar events?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, gcal was just unused

@mhdawson
Copy link
Member

Great to see progress on this. Let me know when it is ready for review/landing will be great to have another option for editing the minutes.

Base automatically changed from master to main March 10, 2021 21:40
@mhdawson
Copy link
Member

mhdawson commented Jan 7, 2022

I'm going to close this because I don't think it's likely to progress at this point. Please let me know if you think that was the wrong thing to do and feel free to re-open.

@mhdawson mhdawson closed this Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants