Skip to content

Fixes #17048: GitHub actions for retrieving commits #17052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jeevikasirwani
Copy link

@jeevikasirwani jeevikasirwani commented Jun 10, 2025

Resolves ##17048

WHY

Implements GitHub Actions workflow for:

  • List commits
  • Get commit

Summary by CodeRabbit

  • New Features
    • Introduced a manual workflow to retrieve and export recent commit data as downloadable artifacts.
    • Added a new action enabling chat interactions with the OpenAI Responses API, supporting model selection, multi-turn conversations, tool integration, and custom response formats (including JSON schema).

Copy link

vercel bot commented Jun 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
pipedream-docs ⬜️ Ignored (Inspect) Jun 10, 2025 11:58am
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jun 10, 2025 11:58am

Copy link

vercel bot commented Jun 10, 2025

@jeevikasirwani is attempting to deploy a commit to the Pipedreamers Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Jun 10, 2025

Walkthrough

A new GitHub Actions workflow for retrieving commit data and a new OpenAI chat action module have been introduced. The workflow fetches and uploads commit information as artifacts, while the module enables multi-turn chat interactions with OpenAI's Responses API, supporting built-in and external tools, customizable response formats, and dynamic schema integration.

Changes

File(s) Change Summary
.github/workflows/retrieve-commits.yml Added a workflow to fetch the latest 30 commits and details of the current commit, saving them as artifacts.
components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs Introduced a new action for chat with OpenAI Responses API, supporting multi-turn, tool integration, and JSON schema output.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GitHub Actions
    participant Repo
    participant Artifact Store

    User->>GitHub Actions: Trigger "Retrieve Commits" workflow
    GitHub Actions->>Repo: Checkout repository
    GitHub Actions->>Repo: Fetch latest 30 commits (API)
    GitHub Actions->>Repo: Fetch current commit details (API)
    GitHub Actions->>Artifact Store: Upload commits.json and commit.json as artifacts
Loading
sequenceDiagram
    participant User
    participant ChatAction
    participant OpenAI API
    participant MCP Server (optional)

    User->>ChatAction: Provide input, options, and tools
    ChatAction->>MCP Server: (If MCP tools enabled) Fetch available tools
    ChatAction->>OpenAI API: Send chat request with model, input, tools, and optional JSON schema
    OpenAI API-->>ChatAction: Return chat response and response ID
    ChatAction->>User: Export output and summary
Loading

Poem

In the warren of code, new features appear,
Commits retrieved, their stories clear.
A chat with AI, tools at its side,
JSON or text, you get to decide!
With each new hop, the future looks bright—
🐇✨ Code and conversation, both taking flight!

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:201:49)

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in 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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@adolfo-pd adolfo-pd added the User submitted Submitted by a user label Jun 10, 2025
@pipedream-component-development
Copy link
Collaborator

Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.

@pipedream-component-development
Copy link
Collaborator

Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:

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: 6

🧹 Nitpick comments (2)
.github/workflows/retrieve-commits.yml (1)

1-39: Fix YAML formatting issues

The workflow has several formatting issues that should be addressed for consistency.

Remove trailing spaces from lines 3, 11, 15, 32, and 39, and add a newline at the end of the file. Most editors can be configured to automatically trim trailing whitespace and ensure files end with a newline.

🧰 Tools
🪛 actionlint (1.7.7)

13-13: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


34-34: the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.37.1)

[error] 11-11: trailing spaces

(trailing-spaces)


[error] 15-15: trailing spaces

(trailing-spaces)


[error] 32-32: trailing spaces

(trailing-spaces)


[error] 39-39: no new line character at the end of file

(new-line-at-end-of-file)


[error] 39-39: trailing spaces

(trailing-spaces)

components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs (1)

147-195: Add input validation for required fields

Consider adding validation for required inputs to provide better error messages to users.

   async run({ $ }) {
     if (this.skipThisStep) {
       $.export("$summary", "Step execution skipped");
       return;
     }
+    
+    // Validate required inputs
+    if (!this.input?.trim()) {
+      throw new Error("Chat input is required and cannot be empty");
+    }
+    
+    if (this.responseFormat === constants.CHAT_RESPONSE_FORMAT.JSON_SCHEMA.value && !this.jsonSchema) {
+      throw new Error("JSON Schema is required when response format is set to json_schema");
+    }
+    
     const tools = [];
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 89dd558 and 5f8ac84.

⛔ Files ignored due to path filters (6)
  • components/quickbooks/package-lock.json is excluded by !**/package-lock.json
  • components/smiirl/package-lock.json is excluded by !**/package-lock.json
  • docs-v2/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • helpers/package-lock.json is excluded by !**/package-lock.json
  • packages/connect-react/examples/nextjs/package-lock.json is excluded by !**/package-lock.json
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • .github/workflows/retrieve-commits.yml (1 hunks)
  • components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/retrieve-commits.yml

13-13: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


34-34: the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.37.1)
.github/workflows/retrieve-commits.yml

[error] 11-11: trailing spaces

(trailing-spaces)


[error] 15-15: trailing spaces

(trailing-spaces)


[error] 32-32: trailing spaces

(trailing-spaces)


[error] 39-39: no new line character at the end of file

(new-line-at-end-of-file)


[error] 39-39: trailing spaces

(trailing-spaces)

🔇 Additional comments (1)
components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs (1)

100-105: ⚠️ Potential issue

Fix quote escaping in description

The description string contains unescaped quotes that could cause parsing issues.

     mcpServers: {
       type: "string[]",
       label: "MCP Server URLs",
       description:
-        "Enter your MCP server base URLs. To set one up, visit https://mcp.pipedream.com/ and click "Create new server.",
+        "Enter your MCP server base URLs. To set one up, visit https://mcp.pipedream.com/ and click \"Create new server.\"",
       optional: true,
     },

Likely an incorrect or invalid review comment.

Comment on lines +12 to +14
- name: Checkout repository
uses: actions/checkout@v3

Copy link
Contributor

@coderabbitai coderabbitai bot Jun 10, 2025

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Update to latest checkout action version

The workflow is using an outdated version of the checkout action. Please update to v4 for improved security and compatibility.

-      - name: Checkout repository
-        uses: actions/checkout@v3
+      - name: Checkout repository
+        uses: actions/checkout@v4
📝 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
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4
🧰 Tools
🪛 actionlint (1.7.7)

13-13: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
In .github/workflows/retrieve-commits.yml around lines 12 to 14, update the
checkout action version from v3 to v4 by changing the uses line to
actions/checkout@v4 to ensure improved security and compatibility.

Copy link
Collaborator

Choose a reason for hiding this comment

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

is not better to use actions/checkout@v4 here?

Copy link
Contributor

Choose a reason for hiding this comment

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

@jcortes Yes, absolutely! actions/checkout@v4 is definitely better than v3. As the actionlint tool flagged, v3 is too old to run on current GitHub Actions runners, and v4 provides improved security and compatibility.

The suggestion to update to v4 is spot on - it's a straightforward upgrade that will ensure the workflow continues to work properly on GitHub's infrastructure.

🐰✨

Comment on lines +33 to +39
- name: Upload commit data
uses: actions/upload-artifact@v3
with:
name: commit-data
path: |
commits.json
commit.json
Copy link
Contributor

@coderabbitai coderabbitai bot Jun 10, 2025

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Update to latest upload-artifact action version and fix formatting

The workflow is using an outdated version of the upload-artifact action and has formatting issues.

       - name: Upload commit data
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: commit-data
           path: |
             commits.json
-            commit.json 
+            commit.json
📝 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
- name: Upload commit data
uses: actions/upload-artifact@v3
with:
name: commit-data
path: |
commits.json
commit.json
- name: Upload commit data
uses: actions/upload-artifact@v4
with:
name: commit-data
path: |
commits.json
commit.json
🧰 Tools
🪛 actionlint (1.7.7)

34-34: the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.37.1)

[error] 39-39: no new line character at the end of file

(new-line-at-end-of-file)


[error] 39-39: trailing spaces

(trailing-spaces)

🤖 Prompt for AI Agents
In .github/workflows/retrieve-commits.yml around lines 33 to 39, update the
actions/upload-artifact action to the latest version (currently v4) to ensure
compatibility and improvements. Also, fix the formatting by removing any
trailing spaces in the path list and ensure consistent indentation for the
'name' and 'path' keys under 'with'.

Copy link
Collaborator

Choose a reason for hiding this comment

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

same question here isn't better to use actions/upload-artifact@v4 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

@jcortes Absolutely! You're correct that actions/upload-artifact@v4 is better. As I mentioned in my previous suggestion, v3 is flagged by actionlint as being too old to run on GitHub Actions.

Version v4 offers several improvements:

  • Better compatibility with current GitHub Actions runners
  • Enhanced security and performance optimizations
  • Future-proofing to avoid deprecation warnings

The upgrade is straightforward and maintains the same API, so it's definitely the recommended approach for this workflow.

🐰💡

Comment on lines +171 to +185
if (
this.responseFormat ===
constants.CHAT_RESPONSE_FORMAT.JSON_SCHEMA.value
) {
try {
data.text = {
format: {
type: this.responseFormat,
...JSON.parse(this.jsonSchema),
},
};
} catch {
throw new Error("Invalid JSON format in the provided JSON Schema");
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Fix response format property name and improve error handling

The response format configuration appears to use an incorrect property name, and the JSON parsing error message could be more helpful.

     if (
       this.responseFormat ===
       constants.CHAT_RESPONSE_FORMAT.JSON_SCHEMA.value
     ) {
       try {
-        data.text = {
+        data.response_format = {
           format: {
             type: this.responseFormat,
             ...JSON.parse(this.jsonSchema),
           },
         };
-      } catch {
-        throw new Error("Invalid JSON format in the provided JSON Schema");
+      } catch (error) {
+        throw new Error(`Invalid JSON Schema: ${error.message}. Please ensure your schema is valid JSON.`);
       }
     }

Please verify the correct property name for the OpenAI Responses API by checking the API documentation:


🌐 Web query:

What is the correct property name for specifying response format in OpenAI's Responses API?

💡 Result:

In OpenAI's API, the property used to specify the response format is format. This property allows you to define how the API should structure its responses. For example, setting format to json instructs the API to return responses in JSON format.


Fix response format property and enhance JSON parsing error

The API expects a top-level format property, not text or response_format. Also include the caught error message to aid debugging.

• File: components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs
• Lines 171–185

Proposed diff:

     if (
       this.responseFormat ===
       constants.CHAT_RESPONSE_FORMAT.JSON_SCHEMA.value
     ) {
       try {
-        data.text = {
+        data.format = {
           type: this.responseFormat,
-          ...JSON.parse(this.jsonSchema),
+          ...JSON.parse(this.jsonSchema),
         };
-      } catch {
-        throw new Error("Invalid JSON format in the provided JSON Schema");
+      } catch (error) {
+        throw new Error(`Invalid JSON Schema: ${error.message}. Please ensure your schema is valid JSON.`);
       }
     }

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In
components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs
around lines 171 to 185, the code incorrectly assigns the response format under
a nested 'text' property instead of the top-level 'format' property as required
by the OpenAI Responses API. To fix this, replace the assignment to data.text
with data.format and spread the parsed JSON schema inside it. Also, enhance the
error handling by catching the JSON parsing error and including the actual error
message in the thrown error to provide more helpful debugging information.

Copy link
Collaborator

@jcortes jcortes left a comment

Choose a reason for hiding this comment

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

Hi @jeevikasirwani I've just left a few comments/suggestions so please review them, thanks for this great contribution!

Comment on lines +106 to +126
mcpTools: {
type: "string[]",
label: "MCP Tools to Enable",
description:
"Select which tools from your MCP servers to include in the chat.",
optional: true,
async options({ mcpServers }) {
if (!mcpServers?.length) return [];
const all = [];
for (let url of mcpServers) {
url = url.replace(/\/$/, "");
const { data } = await axios.get(`${url}/tools`);
for (const t of data.tools) {
all.push({
label: t.name,
value: t.id,
});
}
}
return all;
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you please create a propDefinition for this one in openai.app.mjs file and reference here, so you can use the axios lib from @pipedream/plaform instead?

import { axios } from "@pipedream/platform";

Copy link
Collaborator

Choose a reason for hiding this comment

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

So this is the solution to this issue #17031
Please increase the minor version in its package.json file

Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these modifications in *-lock.json files necessary for this PR?

Comment on lines +12 to +14
- name: Checkout repository
uses: actions/checkout@v3

Copy link
Collaborator

Choose a reason for hiding this comment

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

is not better to use actions/checkout@v4 here?

Comment on lines +33 to +39
- name: Upload commit data
uses: actions/upload-artifact@v3
with:
name: commit-data
path: |
commits.json
commit.json
Copy link
Collaborator

Choose a reason for hiding this comment

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

same question here isn't better to use actions/upload-artifact@v4 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
User submitted Submitted by a user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ACTION] GItHub actions for retrieving commits
4 participants