Skip to content

Conversation

@avivkeller
Copy link
Member

Now, instead of exiting on an existing issue being found, the script will edit the existing issue/HackMD note (fetched by comparing the titles) if the agenda has changed.

Copilot AI review requested due to automatic review settings October 30, 2025 20:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the artifact creation logic to support updating existing meeting notes documents and GitHub issues instead of only creating new ones. The main changes enable a get-or-create pattern that checks for existing artifacts before creating new ones unless the --force flag is used.

  • Introduces getOrCreateNotesDocument to check for existing HackMD notes by title before creating new ones
  • Introduces createOrUpdateMeetingIssue to check for existing GitHub issues and update them if content differs
  • Removes early exit logic from the main script, moving it into the new functions

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/hackmd.mjs Adds getOrCreateNotesDocument function to find existing HackMD notes or create new ones based on the force flag
src/github.mjs Adds createOrUpdateMeetingIssue and updateMeetingIssue functions to support updating existing GitHub issues
create-node-meeting-artifacts.mjs Removes early-exit logic and updates function calls to use the new get-or-create and create-or-update functions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@avivkeller
Copy link
Member Author

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings October 30, 2025 20:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@avivkeller avivkeller requested a review from ovflowd October 31, 2025 21:31
const existingIssue = await findIssueByTitle(
githubClient,
title,
meetingConfig
Copy link
Member

Choose a reason for hiding this comment

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

Why we need to pass the meetingConfig?

Copy link
Member Author

Choose a reason for hiding this comment

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

To get the repository to search from

@avivkeller avivkeller requested review from Copilot and ovflowd November 2, 2025 17:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (3)

src/hackmd.mjs:1

  • Function name mismatch: the function is named getOrCreateMeetingNotesDocument in the diff but the existing codebase uses getOrCreateNotesDocument. This inconsistency will cause the function call in create-node-meeting-artifacts.mjs to fail since it calls getOrCreateNotesDocument.
import HackMDAPI from '@hackmd/api';

src/github.mjs:1

  • Function name mismatch: the function is named createOrUpdateGitHubIssue in the diff but the existing codebase uses createOrUpdateMeetingIssue. This inconsistency will cause the function call in create-node-meeting-artifacts.mjs to fail since it calls createOrUpdateMeetingIssue.
import { Octokit } from '@octokit/rest';

src/github.mjs:1

  • The updateGitHubIssue function accesses githubClient.issues.update directly, but createGitHubIssue uses { rest } destructuring to access rest.issues.create. This inconsistency in how the githubClient is accessed could lead to runtime errors. The function should destructure rest from githubClient or use the full path consistently.
import { Octokit } from '@octokit/rest';

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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