Skip to content

Conversation

@dannyroosevelt
Copy link
Collaborator

@dannyroosevelt dannyroosevelt commented Oct 15, 2025

Starting with a handful of the top apps. These can be helpful for LLMs that are using our actions as tools to introspect the current user. For example, to get "my issues" in Linear, the LLM needs to know what teams teams the user is on, and to know that, it needs to know who the user is. The goal is to help reduce the tool calls involved in certain queries, and see if this pattern might be helpful more broadly.

WHY

Summary by CodeRabbit

  • New Features
    • Added “Get Current User” actions for GitHub, Google Calendar, Google Drive, Google Sheets, Linear, Notion, and Slack to retrieve each service’s current user and related context (orgs/teams, calendars/settings/colors, Drive/Sheets about info, org/teams/memberships, workspace/owner details, Slack auth/profile/team).
  • Chores
    • Patch version bumps for GitHub, Google Calendar, Google Drive, Google Sheets, Linear, Notion, and Slack components.

Starting with a handful of the top apps
@vercel
Copy link

vercel bot commented Oct 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Oct 16, 2025 3:28pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Oct 16, 2025 3:28pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 15, 2025

Walkthrough

Adds new "Get Current User" actions for GitHub, Google Calendar, Google Drive, Google Sheets, Linear, Notion, and Slack that fetch authenticated user context and related data (often concurrently). Also bumps patch versions for the affected component packages.

Changes

Cohort / File(s) Summary of changes
GitHub Action + Version
components/github/actions/get-current-user/get-current-user.mjs, components/github/package.json
New action fetching authenticated user, organizations (limited by DEFAULT_ORGS_LIMIT), and teams (limited by DEFAULT_TEAMS_LIMIT); returns { user, organizations, teams }. Package version bumped 1.8.0 → 1.8.1.
Google Calendar Action + Version
components/google_calendar/actions/get-current-user/get-current-user.mjs, components/google_calendar/package.json
New action concurrently fetches primary calendar, a sample list of calendars (DEFAULT_CALENDAR_SAMPLE_LIMIT = 25), settings, and colors; derives timezone and locale; returns aggregated data. Version bumped 0.5.12 → 0.5.13.
Google Drive Action + Version
components/google_drive/actions/get-current-user/get-current-user.mjs, components/google_drive/package.json
New action fetching Drive about info (ABOUT_FIELDS = "user,storageQuota"); computes summary from user fields and returns { about }. Version bumped 1.1.1 → 1.1.2.
Google Sheets Action + Version
components/google_sheets/actions/get-current-user/get-current-user.mjs, components/google_sheets/package.json
New action calling Drive about via the Sheets client (ABOUT_FIELDS = "user,storageQuota"), derives a summary, and returns { about }. Version bumped 0.9.1 → 0.9.2.
Linear Action + Version
components/linear/actions/get-current-user/get-current-user.mjs, components/linear/package.json
New GraphQL-backed action that queries viewer, organization, teams (first N), and teamMemberships (first N) via the Linear client; returns { user, organization, teams, teamMemberships }. Version bumped 0.8.0 → 0.8.1.
Notion Action + Version
components/notion/actions/get-current-user/get-current-user.mjs, components/notion/package.json
New action calling notion.getUser("me"), derives displayName and contextual workspace/owner summary, exports $summary, and returns the API response. Version bumped 1.0.3 → 1.0.4.
Slack Action + Version
components/slack/actions/get-current-user/get-current-user.mjs, components/slack/package.json
New action running auth.test, resolving userId, and best-effort fetching of users.info, profile, and team info; assembles authContext, user, profile, and team objects, exports a summary, and returns collected data. Version bumped 0.10.2 → 0.10.3.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Runner
  participant Action as Get Current User Action
  participant Provider as Provider API

  Runner->>Action: run()
  rect rgba(200,230,255,0.15)
    note right of Action: perform parallel fetches where available
    par Fetch auth
      Action->>Provider: get authenticated user/context
    and Fetch related resources
      Action->>Provider: get orgs / teams / calendars / settings / colors / about / profile / team info
    end
  end
  Provider-->>Action: responses
  Action->>Action: assemble result, export $summary
  Action-->>Runner: return { user, ...relatedData }
Loading
sequenceDiagram
  autonumber
  actor Runner
  participant LinearAction as Linear Get Current User
  participant LinearGQL as Linear GraphQL API

  Runner->>LinearAction: run()
  par Viewer
    LinearAction->>LinearGQL: query viewer { ... }
  and Organization
    LinearAction->>LinearGQL: query organization { ... }
  and Teams
    LinearAction->>LinearGQL: query teams(first:N) { nodes, pageInfo }
  and TeamMemberships
    LinearAction->>LinearGQL: query teamMemberships(first:N) { nodes, pageInfo }
  end
  LinearGQL-->>LinearAction: datasets
  LinearAction->>LinearAction: assemble response
  LinearAction-->>Runner: return { user, organization, teams, teamMemberships }
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Poem

I hop through APIs at dawn's first light,
Fetching users, teams, calendars bright,
Drive and Sheets, Slack and Notion too,
Linear and GitHub—I gathered the crew.
A happy rabbit delivers the view. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description includes an introductory explanation but leaves the required “## WHY” section empty, failing to follow the repository’s template that expects the rationale under that heading rather than as free-form text above it. Please complete the required “## WHY” section by moving or summarizing the introductory rationale into that heading so it matches the repository’s description template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title succinctly and accurately summarizes the main change by stating that several “Get Current User” actions are being added, matching the bulk of new modules in the diff and conveying the primary intent without unnecessary detail.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch danny/authed-user-actions

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b4224b6 and ed3f47d.

📒 Files selected for processing (2)
  • components/linear/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/slack/actions/get-current-user/get-current-user.mjs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/linear/actions/get-current-user/get-current-user.mjs
🧰 Additional context used
🧬 Code graph analysis (1)
components/slack/actions/get-current-user/get-current-user.mjs (3)
components/google_drive/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (22-25)
components/google_calendar/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (46-46)
components/google_sheets/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (22-25)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@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: 1

♻️ Duplicate comments (2)
components/slack/actions/get-current-user/get-current-user.mjs (2)

35-43: Same issue: Rate limit errors are silently caught.

This has the same inconsistency as the usersInfo call above. Apply the same fix here.


45-52: Same issue: Rate limit errors are silently caught.

This has the same inconsistency as the previous API calls. Apply the same fix here.

🧹 Nitpick comments (4)
components/google_drive/actions/get-current-user/get-current-user.mjs (1)

22-25: Consider extracting common user name derivation logic.

This exact fallback chain for deriving summaryName is duplicated in the Google Sheets action. Since both Google Drive and Google Sheets use the Drive API's about endpoint with identical fields and logic, consider extracting this into a shared helper function to reduce duplication.

For example, create a shared utility:

// common/google-user-utils.mjs
export function deriveUserDisplayName(about) {
  return about?.user?.displayName
    || about?.user?.emailAddress
    || about?.user?.permissionId;
}

Then import and use in both actions:

+import { deriveUserDisplayName } from "../../common/google-user-utils.mjs";
+
 const ABOUT_FIELDS = "user,storageQuota";

 export default {
   // ...
   async run({ $ }) {
     const about = await this.googleDrive.getAbout(ABOUT_FIELDS);

-    const summaryName =
-      about?.user?.displayName
-      || about?.user?.emailAddress
-      || about?.user?.permissionId;
+    const summaryName = deriveUserDisplayName(about);
     $.export("$summary", `Retrieved Google Drive user ${summaryName}`);

     return {
       about,
     };
   },
 };
components/google_sheets/actions/get-current-user/get-current-user.mjs (1)

22-25: Duplicate logic with Google Drive action.

This summaryName derivation is identical to the Google Drive action. See the refactoring suggestion in the Google Drive review to extract this common logic into a shared utility.

components/notion/actions/get-current-user/get-current-user.mjs (1)

24-32: Consider simplifying the owner formatting logic.

The IIFE on lines 26-31 adds complexity for what is essentially conditional string formatting. A simpler approach would improve readability.

Consider this alternative:

     const displayName = response?.name || response?.bot?.workspace_name || response?.id;
     const ownerUser = response?.bot?.owner?.user;
-    const ownerName = ownerUser?.name || ownerUser?.id;
-    const ownerEmail = ownerUser?.person?.email;
+    
+    let ownerInfo = null;
+    if (ownerUser) {
+      const name = ownerUser.name || ownerUser.id;
+      const email = ownerUser.person?.email;
+      ownerInfo = email ? `owner ${name} (<${email}>)` : `owner ${name}`;
+    }
+    
     const summaryParts = [
       response?.bot?.workspace_name && `workspace **${response.bot.workspace_name}**`,
-      (() => {
-        if (!ownerName && !ownerEmail) return null;
-        if (ownerName && ownerEmail) return `owner ${ownerName} (<${ownerEmail}>)`;
-        if (ownerName) return `owner ${ownerName}`;
-        return `owner <${ownerEmail}>`;
-      })(),
+      ownerInfo,
     ].filter(Boolean);
components/slack/actions/get-current-user/get-current-user.mjs (1)

24-52: Consider concurrent API calls for better performance.

The three independent API calls (usersInfo, getUserProfile, getTeamInfo) execute sequentially, which increases total latency. Since each has graceful degradation, they can run concurrently.

Apply this diff to make the calls concurrent:

-    let userInfo;
-    try {
-      userInfo = await this.slack.usersInfo({
-        user: userId,
-        include_locale: true,
-        throwRateLimitError: true,
-      });
-    } catch (error) {
-      // Gracefully degrade if scope not available
-    }
-
-    let userProfile;
-    try {
-      userProfile = await this.slack.getUserProfile({
-        user: userId,
-        throwRateLimitError: true,
-      });
-    } catch (error) {
-      // Gracefully degrade if scope not available
-    }
-
-    let teamInfo;
-    try {
-      teamInfo = await this.slack.getTeamInfo({
-        throwRateLimitError: true,
-      });
-    } catch (error) {
-      // Gracefully degrade if scope not available
-    }
+    const [
+      userInfoResult,
+      userProfileResult,
+      teamInfoResult,
+    ] = await Promise.allSettled([
+      this.slack.usersInfo({
+        user: userId,
+        include_locale: true,
+        throwRateLimitError: true,
+      }),
+      this.slack.getUserProfile({
+        user: userId,
+        throwRateLimitError: true,
+      }),
+      this.slack.getTeamInfo({
+        throwRateLimitError: true,
+      }),
+    ]);
+
+    const userInfo = userInfoResult.status === 'fulfilled' ? userInfoResult.value : undefined;
+    const userProfile = userProfileResult.status === 'fulfilled' ? userProfileResult.value : undefined;
+    const teamInfo = teamInfoResult.status === 'fulfilled' ? teamInfoResult.value : undefined;

This pattern aligns with the GitHub action implementation (see components/github/actions/get-current-user/get-current-user.mjs) and reduces total execution time when multiple calls succeed.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ac0a58c and b77208e.

📒 Files selected for processing (14)
  • components/github/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/github/package.json (1 hunks)
  • components/google_calendar/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/google_calendar/package.json (1 hunks)
  • components/google_drive/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/google_drive/package.json (1 hunks)
  • components/google_sheets/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/google_sheets/package.json (1 hunks)
  • components/linear/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/linear/package.json (1 hunks)
  • components/notion/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/notion/package.json (1 hunks)
  • components/slack/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/slack/package.json (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (6)
components/github/actions/get-current-user/get-current-user.mjs (2)
components/linear/actions/get-current-user/get-current-user.mjs (2)
  • user (64-90)
  • teams (45-62)
components/zoho_desk/zoho_desk.app.mjs (1)
  • organizations (14-15)
components/google_calendar/actions/get-current-user/get-current-user.mjs (3)
components/google_drive/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (22-25)
components/google_sheets/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (22-25)
components/slack/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (56-60)
components/google_drive/actions/get-current-user/get-current-user.mjs (1)
components/google_sheets/actions/get-current-user/get-current-user.mjs (3)
  • ABOUT_FIELDS (3-3)
  • about (20-20)
  • summaryName (22-25)
components/google_sheets/actions/get-current-user/get-current-user.mjs (1)
components/google_drive/actions/get-current-user/get-current-user.mjs (3)
  • ABOUT_FIELDS (3-3)
  • about (20-20)
  • summaryName (22-25)
components/slack/actions/get-current-user/get-current-user.mjs (5)
components/github/actions/get-current-user/get-current-user.mjs (1)
  • user (21-31)
components/linear/actions/get-current-user/get-current-user.mjs (1)
  • user (64-90)
components/google_calendar/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (46-46)
components/google_drive/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (22-25)
components/google_sheets/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (22-25)
components/linear/actions/get-current-user/get-current-user.mjs (1)
components/github/actions/get-current-user/get-current-user.mjs (1)
  • user (21-31)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (14)
components/notion/package.json (1)

3-3: LGTM!

Standard patch version bump for the new action. No issues detected.

components/linear/package.json (1)

3-3: LGTM!

Appropriate patch version increment. No issues detected.

components/github/package.json (1)

3-3: LGTM!

Appropriate patch version increment. No issues detected.

components/google_sheets/package.json (1)

3-3: LGTM!

Appropriate patch version increment. No issues detected.

components/google_drive/package.json (1)

3-3: LGTM!

Appropriate patch version increment. No issues detected.

components/google_drive/actions/get-current-user/get-current-user.mjs (1)

5-31: Action structure looks good.

The action metadata is clear and descriptive, and the run function follows a clean pattern: fetch data, derive summary, export, and return. The use of optional chaining provides safe access to potentially missing fields.

components/google_sheets/actions/get-current-user/get-current-user.mjs (1)

5-31: Action structure looks good.

The action follows the same clean pattern as the Google Drive action, with clear metadata and a straightforward run function.

components/notion/actions/get-current-user/get-current-user.mjs (1)

3-41: Action structure and metadata look good.

The action follows a clear pattern, with comprehensive metadata and a run function that appropriately handles the Notion user response, including bot workspace ownership context.

components/slack/actions/get-current-user/get-current-user.mjs (6)

1-16: LGTM!

The metadata, annotations, and props are well-structured. The comprehensive description clearly explains the action's purpose and use cases.


17-20: LGTM!

The authTest call correctly lacks error handling, allowing authentication failures to propagate. This is appropriate since this is the foundational call that determines if the user is authenticated.


22-22: LGTM!

The fallback pattern for extracting userId is appropriate and handles variations in the authContext response.


54-60: LGTM!

The defensive fallback pattern for summaryName is well-designed and consistent with similar implementations in Google Calendar, Google Drive, and Google Sheets actions.


62-65: LGTM!

The summary export correctly uses the computed summaryName fallback chain.


67-99: LGTM!

The return object structure is well-designed with comprehensive user and team fields. The conditional object inclusion pattern (user && { ... }) appropriately handles cases where data is unavailable.

Copy link
Contributor

@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: 1

🧹 Nitpick comments (1)
components/slack/actions/get-current-user/get-current-user.mjs (1)

22-46: Consider adding minimal logging for error visibility.

The graceful degradation pattern is appropriate for handling missing scopes, but silently catching all errors (network failures, API issues, invalid parameters) makes debugging difficult.

Apply this diff to add minimal logging without breaking the graceful degradation:

     try {
       userInfo = await this.slack.usersInfo({
         user: userId,
         include_locale: true,
       });
     } catch (error) {
-      // Gracefully degrade if scope not available
+      console.warn(`Failed to fetch user info: ${error.message}`);
     }
 
     let userProfile;
     try {
       userProfile = await this.slack.getUserProfile({
         user: userId,
       });
     } catch (error) {
-      // Gracefully degrade if scope not available
+      console.warn(`Failed to fetch user profile: ${error.message}`);
     }
 
     let teamInfo;
     try {
       teamInfo = await this.slack.getTeamInfo();
     } catch (error) {
-      // Gracefully degrade if scope not available
+      console.warn(`Failed to fetch team info: ${error.message}`);
     }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b77208e and ed7e235.

📒 Files selected for processing (1)
  • components/slack/actions/get-current-user/get-current-user.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/slack/actions/get-current-user/get-current-user.mjs (4)
components/linear/actions/get-current-user/get-current-user.mjs (1)
  • user (64-90)
components/google_calendar/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (46-46)
components/google_drive/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (22-25)
components/google_sheets/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (22-25)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (2)
components/slack/actions/get-current-user/get-current-user.mjs (2)

1-16: LGTM!

The metadata and structure are well-defined. The comprehensive description is appropriate given the PR's goal of enabling LLMs to introspect authenticated user context.


48-59: LGTM!

The summary computation uses a robust fallback chain, consistent with similar implementations in Google Calendar and other services in this PR.

Copy link
Contributor

@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: 1

🧹 Nitpick comments (6)
components/linear/actions/get-current-user/get-current-user.mjs (2)

27-43: Consider adding error handling for API failures.

The parallel data fetching improves performance, but there's no error handling if any of the API calls fail. Consider wrapping the operations in a try-catch block and providing meaningful error messages.

Apply this diff to add error handling:

 async run({ $ }) {
+  try {
     const client = this.linearApp.client();
     const viewer = await client.viewer;

     const [
       organization,
       teamsConnection,
       teamMembershipsConnection,
     ] = await Promise.all([
       viewer.organization,
       viewer.teams({
         first: DEFAULT_CONNECTION_LIMIT,
       }),
       viewer.teamMemberships({
         first: DEFAULT_CONNECTION_LIMIT,
       }),
     ]);
+  } catch (error) {
+    throw new Error(`Failed to fetch Linear user data: ${error.message}`);
+  }

Note: You'll need to move the rest of the run method logic inside the try block and adjust the closing brace accordingly.


147-158: Return structure is well-designed.

The response object provides comprehensive user context with proper pagination metadata. Consider making DEFAULT_CONNECTION_LIMIT configurable as a prop if users frequently need more than 50 teams or memberships, though this is optional for the initial implementation.

components/google_calendar/actions/get-current-user/get-current-user.mjs (1)

49-56: Consider adding a default value for locale for consistency.

The return object is well-structured. However, calendars and settings use ?? to provide default empty arrays, while locale returns undefined if not found. Adding a default (e.g., null or "") would make the handling more consistent and predictable for consumers.

Apply this diff if you want to add a default value:

 return {
   primaryCalendar,
   calendars: calendarList?.items ?? [],
   settings: settings?.items ?? [],
   timezone: timezoneSetting || primaryCalendar?.timeZone,
-  locale: localeSetting,
+  locale: localeSetting ?? null,
   colors,
 };
components/github/actions/get-current-user/get-current-user.mjs (3)

3-4: Consider making these limits configurable props.

While hardcoded limits keep the action simple for the LLM use case, exposing them as optional props (with these as defaults) would provide flexibility for users with many orgs/teams.

Example:

+  orgsLimit: {
+    type: "integer",
+    label: "Organizations Limit",
+    description: "Maximum number of organizations to return",
+    default: DEFAULT_ORGS_LIMIT,
+    optional: true,
+  },
+  teamsLimit: {
+    type: "integer",
+    label: "Teams Limit",
+    description: "Maximum number of teams to return",
+    default: DEFAULT_TEAMS_LIMIT,
+    optional: true,
+  },

Then use this.orgsLimit ?? DEFAULT_ORGS_LIMIT and this.teamsLimit ?? DEFAULT_TEAMS_LIMIT in the slicing operations.


9-9: Document the 20-item limits in the description.

The description should mention that organizations and teams are limited to 20 items each for clarity.

Example addition to the description:

-description: "Gather a full snapshot of the authenticated GitHub actor, combining `/user`, `/user/orgs`, and `/user/teams`. Returns profile metadata (login, name, email, company, plan, creation timestamps) and trimmed lists of organizations and teams for quick role awareness. Helpful when you need to validate which user is calling the API, adapt behavior based on their org/team memberships, or provide LLMs with grounding before repository operations. [See the documentation](https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-user).",
+description: "Gather a full snapshot of the authenticated GitHub actor, combining `/user`, `/user/orgs`, and `/user/teams`. Returns profile metadata (login, name, email, company, plan, creation timestamps) and trimmed lists of organizations (up to 20) and teams (up to 20) for quick role awareness. Helpful when you need to validate which user is calling the API, adapt behavior based on their org/team memberships, or provide LLMs with grounding before repository operations. [See the documentation](https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-user).",

27-30: Limit organization and team fetch at source
getOrganizations() issues a single request (default per_page = 30) and returns all results before slicing; getTeams() pulls every page via paginate(). Modify both wrappers to accept pagination parameters and pass per_page: DEFAULT_*_LIMIT instead of slicing:

// components/github/github.app.mjs
async getOrganizations(params = {}) {
-  const response = await this._client().request("GET /user/orgs", {});
+  const response = await this._client().request("GET /user/orgs", params);
  return response.data;
}
async getTeams(params = {}) {
-  return this._client().paginate("GET /user/teams", {});
+  return this._client().paginate("GET /user/teams", params);
}

// components/github/actions/get-current-user/get-current-user.mjs
const [
  user,
- this.github.getOrganizations()
-   .then((orgs) => orgs.slice(0, DEFAULT_ORGS_LIMIT)),
- this.github.getTeams()
-   .then((teams) => teams.slice(0, DEFAULT_TEAMS_LIMIT)),
+ this.github.getOrganizations({ per_page: DEFAULT_ORGS_LIMIT }),
+ this.github.getTeams({ per_page: DEFAULT_TEAMS_LIMIT }),
];
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9beca8e and b4224b6.

📒 Files selected for processing (7)
  • components/github/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/google_calendar/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/google_drive/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/google_sheets/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/linear/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/notion/actions/get-current-user/get-current-user.mjs (1 hunks)
  • components/slack/actions/get-current-user/get-current-user.mjs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • components/google_drive/actions/get-current-user/get-current-user.mjs
  • components/slack/actions/get-current-user/get-current-user.mjs
  • components/notion/actions/get-current-user/get-current-user.mjs
  • components/google_sheets/actions/get-current-user/get-current-user.mjs
🧰 Additional context used
🧬 Code graph analysis (3)
components/github/actions/get-current-user/get-current-user.mjs (2)
components/linear/actions/get-current-user/get-current-user.mjs (2)
  • user (64-90)
  • teams (45-62)
components/slack/actions/get-current-user/get-current-user.mjs (1)
  • user (51-51)
components/google_calendar/actions/get-current-user/get-current-user.mjs (3)
components/google_drive/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (22-25)
components/google_sheets/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (22-25)
components/slack/actions/get-current-user/get-current-user.mjs (1)
  • summaryName (53-57)
components/linear/actions/get-current-user/get-current-user.mjs (1)
components/github/actions/get-current-user/get-current-user.mjs (1)
  • user (21-31)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (9)
components/linear/actions/get-current-user/get-current-user.mjs (5)

1-11: LGTM! Clean helper functions.

The import and helper functions are well-structured. The toIsoString and toPageInfo helpers safely handle optional values using optional chaining and guards.


13-26: LGTM! Metadata is complete and accurate.

The action metadata is well-defined with appropriate annotations for a read-only introspection action.


45-62: LGTM! Teams mapping is comprehensive and safe.

The team mapping extracts relevant fields and handles optional values appropriately with nullish coalescing.


64-101: LGTM! User and membership mappings are thorough.

The user object and team memberships are well-structured with appropriate timestamp handling and safe defaults.


103-142: LGTM! Organization data construction is safe.

The conditional construction with the guard clause appropriately handles cases where organization data may not be available.

components/google_calendar/actions/get-current-user/get-current-user.mjs (4)

1-4: LGTM! Clean imports and reasonable constant.

The imports are appropriate, and the DEFAULT_CALENDAR_SAMPLE_LIMIT of 25 provides a sensible sample size for the calendar list without overwhelming the response.


6-19: LGTM! Well-defined action metadata.

The action metadata is comprehensive and follows best practices:

  • Clear, descriptive name and detailed description explaining the use case
  • Appropriate annotations (readOnlyHint: true, destructiveHint: false)
  • Minimal props focusing only on the required app instance

43-47: LGTM! Defensive programming with appropriate fallbacks.

The optional chaining and fallback logic is well-implemented:

  • Safe extraction of timezone and locale settings with ?.find?.
  • Reasonable fallback for the summary name (summary → id)

20-41: Verify error handling behavior for concurrent API calls. A failure in any of the four requests will reject the entire action without returning partial results; no other Google Calendar action uses Promise.allSettled or wraps these calls in try/catch. Confirm this all-or-nothing behavior is intentional.

Comment on lines 144 to 145
const summaryIdentifier = user.name || user.displayName || user.email || user.id;
$.export("$summary", `Retrieved Linear user ${summaryIdentifier}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Remove email from summary to avoid logging PII.

The summary includes user.email as a fallback identifier, which logs personally identifiable information (PII). Workflow summaries can be stored in logs, monitoring systems, or other persistence layers, creating compliance risks under GDPR/CCPA.

Apply this diff to remove email from the summary identifier:

-const summaryIdentifier = user.name || user.displayName || user.email || user.id;
+const summaryIdentifier = user.name || user.displayName || user.id;
 $.export("$summary", `Retrieved Linear user ${summaryIdentifier}`);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const summaryIdentifier = user.name || user.displayName || user.email || user.id;
$.export("$summary", `Retrieved Linear user ${summaryIdentifier}`);
const summaryIdentifier = user.name || user.displayName || user.id;
$.export("$summary", `Retrieved Linear user ${summaryIdentifier}`);
🤖 Prompt for AI Agents
In components/linear/actions/get-current-user/get-current-user.mjs around lines
144 to 145, the summary currently falls back to user.email which logs PII;
remove user.email from the summaryIdentifier fallback list so it only uses
user.name, user.displayName, or user.id, and keep the export statement unchanged
to avoid emitting email in logs.

@dannyroosevelt dannyroosevelt merged commit b545281 into master Oct 16, 2025
8 checks passed
@dannyroosevelt dannyroosevelt deleted the danny/authed-user-actions branch October 16, 2025 15:28
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.

2 participants