Skip to content

Refactor Notion WebHook and add user parameter#6

Open
JackBlaze132 wants to merge 15 commits into
alessandrobelli:mainfrom
JackBlaze132:main
Open

Refactor Notion WebHook and add user parameter#6
JackBlaze132 wants to merge 15 commits into
alessandrobelli:mainfrom
JackBlaze132:main

Conversation

@JackBlaze132

Copy link
Copy Markdown

This pull request makes significant changes to the GitHub Action that syncs commit data to Notion. The main focus is on simplifying the workflow, removing unused features, and improving the mapping of commit data to Notion database columns. The workflow file is cleaned up, unnecessary input options and code for file listing are removed, and a new field for commit user is added.

Workflow and configuration changes:

  • The .github/workflows/main.yml workflow file is removed, eliminating the previous workflow that triggered on pushes and called the Notion sync action.
  • The action.yml file is updated to add a new commit_user input for mapping the committer to a Notion column, and to remove the files_format and token inputs, simplifying the action's configuration. [1] [2]

Codebase simplification and feature removal:

  • The index.js file is refactored to:
    • Remove all logic related to listing files changed in commits, including the associated input parameters and GitHub API calls.
    • Remove support for formatting file lists in Notion blocks.
    • Add support for writing the commit user to a Notion multi-select field, based on the new commit_user input.
    • Clean up and modernize code style and structure.

These changes streamline the action, focusing it on syncing core commit metadata (including the new committer/user field) to Notion, and remove complexity related to file change tracking.

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.

1 participant