feat(notion): add author mention callout block to exported pages#1055
Open
sh1nj1 wants to merge 1 commit into
Open
feat(notion): add author mention callout block to exported pages#1055sh1nj1 wants to merge 1 commit into
sh1nj1 wants to merge 1 commit into
Conversation
When exporting Creatives to Notion, add a callout block at the top of each page with a user mention of the OAuth-authenticated user. This addresses the Notion API limitation where created_by always shows the integration bot instead of the actual user. - Add create_author_callout_block method to NotionCreativeExporter - Prepend author callout on page creation in NotionService - Re-add author callout on page resync (sync_child_blocks) - Add i18n for author label (en: 'Author: ', ko: '작성자: ')
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When exporting Creatives to Notion, the
created_byfield always shows the integration bot due to a Notion API limitation. This PR adds a visible author attribution by inserting a callout block with a user mention at the top of each exported page.Changes
NotionCreativeExporter
create_author_callout_block(notion_user_id)method that creates a Notion callout block (👤 icon) with an@mentionof the authenticated userNotionService
sync_child_blocksrebuilds page content@account.notion_uidwhich already stores the OAuth user's Notion user IDi18n
collavre_notion.export.author_labelkey (en: "Author: ", ko: "작성자: ")How it looks in Notion
Each exported page will show at the top:
This leverages Notion's native user mention, so the author name is clickable and links to the user's profile.
Technical Notes
notion_uid(OAuth user ID) was already stored via the omniauth strategynotion_uidis blank