Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

correctly pass props to notion #179

Merged
merged 3 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This repo is automatically deployed on vercel to [app.watermelon.tools](app.wate

All the backend lives as serverless functions under `api`, with the route being the filename.

As we now use OAuth2.0, local development cannot be done.
As we now use OAuth2.0, local development cannot be done on new integrations.

All environment vars are on vercel, the committer is responsible for correct deployments.

Expand Down
3 changes: 1 addition & 2 deletions components/loginGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ function LoginGrid({ userEmail }) {
{notionUserData?.user_displayname ? (
<InfoPanel
info={{
user_avatar_url: `https://cdn.discordapp.com/avatars/${discordUserData.id}/${discordUserData.avatar_url}`,
...discordUserData,
...notionUserData,
service_name: "Notion",
}}
/>
Expand Down
3 changes: 1 addition & 2 deletions pages/api/actions/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,9 @@ export default async (req, res) => {
console.log("comments.data.length", comments.data.length);
// Find our bot's comment
let botComment = comments.data.find((comment) => {
console.log("comment", comment.id);
comment.user.login.includes("watermelon-context");
});
if (botComment.id) {
if (botComment?.id) {
console.log("bcID", botComment.id);
// Update the existing comment
await octokit.request(
Expand Down