Skip to content

Conversation

@westonplatter
Copy link
Member

@westonplatter westonplatter commented Apr 11, 2025

what

references

  • let's see if this expression, closes #INT-52, closes the issue INT-52

Summary by CodeRabbit

  • New Features
    • Introduced an automated integration that syncs issue updates with Notion. This enhancement triggers on various issue actions—such as creation, updates, and status changes—ensuring streamlined tracking and improved workflow management.

@westonplatter westonplatter requested a review from a team as a code owner April 11, 2025 22:15
@coderabbitai
Copy link

coderabbitai bot commented Apr 11, 2025

Walkthrough

A new GitHub Actions workflow named notion-sync.yaml has been added. This workflow is triggered by manual dispatch events as well as several issue-related events, including opening, editing, labeling, unlabeling, assigning, unassigning, milestone changes, reopening, and closing issues. It runs on the latest Ubuntu runner and executes a single job that uses the tryfabric/notion-github-action@v1 action. The action is configured with inputs sourced from repository secrets to add GitHub issues to a Notion database.

Changes

File(s) Change Summary
.github/workflows/notion-sync.yaml Added a new GitHub Actions workflow that triggers on manual and various issue events. Utilizes the tryfabric/notion-github-action@v1 action with secrets.

Sequence Diagram(s)

sequenceDiagram
    participant Trigger as GitHub Event
    participant Runner as GitHub Actions Runner
    participant NotionAction as Notion Sync Action
    participant NotionDB as Notion Database

    Note over Trigger, Runner: Trigger can be manual dispatch or issue events

    Trigger->>Runner: Initiate workflow (notion-sync.yaml)
    Runner->>NotionAction: Run notion_job on ubuntu-latest
    NotionAction->>NotionDB: Send issue data using secrets (GH_ISSUES_NOTION_TOKEN, GH_ISSUES_DB_ID)
    NotionDB-->>NotionAction: Confirm update
    NotionAction-->>Runner: Return status
Loading

Poem

In a world of code and sync so grand,
A new workflow stretches its hand.
From GitHub issues to Notion’s space,
Each trigger dances with gentle grace.
A token tale in secrets told,
Where automation blooms, bright and bold!
🎉🚀 Happy syncing on our code road!

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8fd3512 and db98019.

📒 Files selected for processing (1)
  • .github/workflows/notion-sync.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/notion-sync.yaml

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
.github/workflows/notion-sync.yaml (2)

3-19: Trigger Configuration Verification & Readability Improvement
The workflow is triggered by both workflow_dispatch and a comprehensive list of issue events which is great for covering various lifecycle changes. The inline array notation for the issue types is valid YAML; however, switching to a block list might enhance readability and ease future maintenance. For example:

-    types:
-      [
-        opened,
-        edited,
-        labeled,
-        unlabeled,
-        assigned,
-        unassigned,
-        milestoned,
-        demilestoned,
-        reopened,
-        closed,
-      ]
+    types:
+      - opened
+      - edited
+      - labeled
+      - unlabeled
+      - assigned
+      - unassigned
+      - milestoned
+      - demilestoned
+      - reopened
+      - closed

Consider this change for improved maintainability.


20-29: Job and Action Setup Verification
The job "notion_job" is properly configured to run on the latest Ubuntu runner, and it clearly outlines the step to add GitHub issues to Notion using the tryfabric/notion-github-action@v1 action. Please ensure that the repository secrets (GH_ISSUES_NOTION_TOKEN and GH_ISSUES_DB_ID) are correctly set. Additionally, while using @v1 is acceptable, consider pinning to a specific commit hash or release version for enhanced reproducibility and security. For instance:

-        uses: tryfabric/notion-github-action@v1
+        uses: tryfabric/notion-github-action@v1.2.3  # Replace with the exact commit hash or version if available

This optional refinement will help prevent unexpected changes from upstream updates.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 52e2664 and 6e39363.

📒 Files selected for processing (1)
  • .github/workflows/notion-sync.yaml (1 hunks)
🔇 Additional comments (1)
.github/workflows/notion-sync.yaml (1)

1-2: Workflow Name Clarity
The workflow name "Notion Sync" is clear and descriptive, aligning well with the PR objective of linking GitHub issues with Notion.

Comment on lines +5 to +6
issues:
types:
Copy link
Member

Choose a reason for hiding this comment

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

Can we sync PRs as well?

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, the gha action code is just focused on issues and specifically ignores issues that are PRs (see this line).

@westonplatter westonplatter requested a review from Gowiem April 16, 2025 19:19
Copy link
Member

@Gowiem Gowiem left a comment

Choose a reason for hiding this comment

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

:shipit:

@westonplatter westonplatter merged commit 857df50 into main Apr 16, 2025
2 checks passed
@westonplatter westonplatter deleted the feat/INT-52-create-gh-notion-sync branch April 16, 2025 21:20
gberenice pushed a commit that referenced this pull request Apr 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.4.0](v0.3.0...v0.4.0)
(2025-04-16)


### Features

* setup connection to notion db
([#21](#21))
([857df50](857df50))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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