-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[ACTION] Github - Update a Pull Request #19113
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
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds a new "Update Pull Request" GitHub action at Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action as Update PR Action
participant App as GitHub App
participant API as GitHub REST API
User->>Action: invoke action (repoFullname, pullNumber, optional fields)
Action->>Action: build payload (include provided: title, body, state)
alt base provided as "sha/branch"
Note right of Action: extract branch name from base
end
alt maintainerCanModify === true
Action->>Action: include maintainer_can_modify: true
end
Action->>App: updatePullRequest(repoFullname, pullNumber, data)
App->>API: PATCH /repos/{repoFullname}/pulls/{pullNumber}
API-->>App: response
App-->>Action: response
Action->>User: export summary + response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
components/github/actions/update-pull-request/update-pull-request.mjs(1 hunks)components/github/github.app.mjs(1 hunks)components/github/package.json(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
components/github/actions/update-pull-request/update-pull-request.mjs (1)
components/github/github.app.mjs (17)
data(715-718)response(396-396)response(403-403)response(418-418)response(429-429)response(470-476)response(487-493)response(501-507)response(515-523)response(567-567)response(572-572)response(579-579)response(586-586)response(591-591)response(598-598)response(605-605)response(612-612)
components/github/github.app.mjs (1)
components/github/actions/update-pull-request/update-pull-request.mjs (2)
response(113-117)data(88-88)
⏰ 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). (4)
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (5)
components/github/package.json (1)
3-3: LGTM! Appropriate version bump for new functionality.The minor version increment from 1.8.3 to 1.9.0 correctly reflects the addition of the new
updatePullRequestaction.components/github/github.app.mjs (1)
602-608: LGTM! Implementation follows established patterns.The
updatePullRequestmethod correctly implements the GitHub API call, following the same structure as similar methods likeupdateIssue. The method signature, request construction, and response handling are all appropriate.components/github/actions/update-pull-request/update-pull-request.mjs (3)
1-13: LGTM! Metadata and annotations are appropriate.The action metadata is well-defined with appropriate annotations. The
destructiveHint: trueis correct for an update operation that modifies existing pull requests.
14-75: Props are well-defined with appropriate propDefinitions.The property definitions correctly leverage existing propDefinitions and include proper descriptions. The
stateoptions of["open", "closed"]align with the GitHub API, as merged state is handled through a different endpoint.
113-122: LGTM! API call and response handling are correct.The call to
github.updatePullRequestis properly structured, and the summary export provides clear feedback about the operation. The response is correctly returned.
ce17e79 to
2da020f
Compare
There was a problem hiding this 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
♻️ Duplicate comments (3)
components/github/actions/update-pull-request/update-pull-request.mjs (3)
57-68: Fix base branch parsing for branch names containing “/”
basecomes from the sharedbranchprop (sha/branchname). The current extraction:data.base = base.split("/")[1];breaks when
branchnameitself contains/(e.g.,feature/my-feature), truncating it tofeature.Use everything after the first
/to preserve full branch names:- if (base) { - // Extract branch name from the branch prop format (sha/branchname) - data.base = base.split("/")[1]; - } + if (base) { + // Extract branch name from the branch prop format (sha/branchname) + // Handle branch names that contain "/" + data.base = base.split("/").slice(1).join("/"); + }Please confirm this matches how other actions using the
branchprop expect the value to be parsed; if so, consider centralizing this logic in a shared helper.Also applies to: 102-105
69-74: Respect explicitfalseformaintainerCanModifyThe current condition:
if (maintainerCanModify === true) { data.maintainer_can_modify = maintainerCanModify; }sends
maintainer_can_modifyonly whentrue. If a user explicitly setsMaintainers Can Modifytofalse, that value is silently dropped, so the setting may not be updated on GitHub.Instead, send the field whenever it’s provided (whether
trueorfalse):- // Only include maintainer_can_modify if explicitly set to true - // This field only applies to cross-repo pull requests (from forks) - if (maintainerCanModify === true) { - data.maintainer_can_modify = maintainerCanModify; - } + // Only include maintainer_can_modify when explicitly set (true or false) + // This field only applies to cross-repo pull requests (from forks) + if (maintainerCanModify !== undefined) { + data.maintainer_can_modify = maintainerCanModify; + }Please confirm in the latest GitHub REST docs that omitting
maintainer_can_modifyleaves the setting unchanged while explicitly sendingfalsedisables it, and update accordingly.Also applies to: 107-111
35-46: Use strict!== undefinedchecks to allow explicit empty-string updatesThe falsy checks for optional fields prevent users from explicitly clearing values. For example,
if (title)treats empty strings""as falsy and skips the assignment.Since Pipedream passes
undefinedfor truly unset props and""for explicitly entered empty strings, change the conditionals:if (title) { + if (title !== undefined) { data.title = title; } if (body) { + if (body !== undefined) { data.body = body; } if (state) { + if (state !== undefined) { data.state = state; } if (base) { + if (base !== undefined) { data.base = base.split("/")[1]; }Note:
maintainerCanModifyat line 82 already uses=== true(correct pattern); no change needed there.Optionally, guard against empty payloads with:
+ if (!Object.keys(data).length) { + throw new Error("You must provide at least one field to update (title, body, state, or base)."); + } + const response = await github.updatePullRequest({
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (56)
components/github/actions/create-branch/create-branch.mjs(1 hunks)components/github/actions/create-gist/create-gist.mjs(1 hunks)components/github/actions/create-issue-comment/create-issue-comment.mjs(1 hunks)components/github/actions/create-issue/create-issue.mjs(1 hunks)components/github/actions/create-or-update-file-contents/create-or-update-file-contents.mjs(1 hunks)components/github/actions/create-pull-request/create-pull-request.mjs(1 hunks)components/github/actions/create-repository/create-repository.mjs(1 hunks)components/github/actions/create-workflow-dispatch/create-workflow-dispatch.mjs(1 hunks)components/github/actions/disable-workflow/disable-workflow.mjs(1 hunks)components/github/actions/enable-workflow/enable-workflow.mjs(1 hunks)components/github/actions/get-commit/get-commit.mjs(1 hunks)components/github/actions/get-current-user/get-current-user.mjs(1 hunks)components/github/actions/get-issue-assignees/get-issue-assignees.mjs(1 hunks)components/github/actions/get-repository-content/get-repository-content.mjs(1 hunks)components/github/actions/get-repository/get-repository.mjs(1 hunks)components/github/actions/get-reviewers/get-reviewers.mjs(1 hunks)components/github/actions/get-workflow-run/get-workflow-run.mjs(1 hunks)components/github/actions/list-commits/list-commits.mjs(1 hunks)components/github/actions/list-gists-for-a-user/list-gists-for-a-user.mjs(1 hunks)components/github/actions/list-releases/list-releases.mjs(1 hunks)components/github/actions/list-workflow-runs/list-workflow-runs.mjs(1 hunks)components/github/actions/search-issues-and-pull-requests/search-issues-and-pull-requests.mjs(1 hunks)components/github/actions/star-repo/star-repo.mjs(1 hunks)components/github/actions/update-gist/update-gist.mjs(1 hunks)components/github/actions/update-issue/update-issue.mjs(1 hunks)components/github/actions/update-project-v2-item-status/update-project-v2-item-status.mjs(1 hunks)components/github/actions/update-pull-request/update-pull-request.mjs(1 hunks)components/github/github.app.mjs(1 hunks)components/github/package.json(1 hunks)components/github/sources/new-branch/new-branch.mjs(1 hunks)components/github/sources/new-card-in-column/new-card-in-column.mjs(1 hunks)components/github/sources/new-collaborator/new-collaborator.mjs(1 hunks)components/github/sources/new-commit-comment/new-commit-comment.mjs(1 hunks)components/github/sources/new-commit/new-commit.mjs(1 hunks)components/github/sources/new-discussion/new-discussion.mjs(1 hunks)components/github/sources/new-fork/new-fork.mjs(1 hunks)components/github/sources/new-gist/new-gist.mjs(1 hunks)components/github/sources/new-issue-comment/new-issue-comment.mjs(1 hunks)components/github/sources/new-issue-with-status/new-issue-with-status.mjs(1 hunks)components/github/sources/new-label/new-label.mjs(1 hunks)components/github/sources/new-mention/new-mention.mjs(1 hunks)components/github/sources/new-notification/new-notification.mjs(1 hunks)components/github/sources/new-or-updated-issue/new-or-updated-issue.mjs(1 hunks)components/github/sources/new-or-updated-milestone/new-or-updated-milestone.mjs(1 hunks)components/github/sources/new-or-updated-pull-request/new-or-updated-pull-request.mjs(1 hunks)components/github/sources/new-organization/new-organization.mjs(1 hunks)components/github/sources/new-release/new-release.mjs(1 hunks)components/github/sources/new-repository/new-repository.mjs(1 hunks)components/github/sources/new-review-request/new-review-request.mjs(1 hunks)components/github/sources/new-security-alert/new-security-alert.mjs(1 hunks)components/github/sources/new-star-by-user/new-star-by-user.mjs(1 hunks)components/github/sources/new-star/new-star.mjs(1 hunks)components/github/sources/new-team/new-team.mjs(1 hunks)components/github/sources/new-workflow-job-completed/new-workflow-job-completed.mjs(1 hunks)components/github/sources/new-workflow-run-completed/new-workflow-run-completed.mjs(1 hunks)components/github/sources/webhook-events/webhook-events.mjs(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-20T01:01:02.970Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 18744
File: components/slack_v2/actions/send-large-message/send-large-message.mjs:49-64
Timestamp: 2025-10-20T01:01:02.970Z
Learning: In components/slack_v2/actions/send-large-message/send-large-message.mjs, the metadata_event_payload prop is typed as string, so the code only needs to handle string-to-JSON parsing and does not need to handle object inputs.
Applied to files:
components/github/actions/create-workflow-dispatch/create-workflow-dispatch.mjs
🧬 Code graph analysis (2)
components/github/actions/update-pull-request/update-pull-request.mjs (3)
components/github/actions/create-issue/create-issue.mjs (2)
data(57-59)response(61-64)components/github/actions/create-or-update-file-contents/create-or-update-file-contents.mjs (2)
data(53-55)response(56-59)components/github/actions/create-pull-request/create-pull-request.mjs (2)
data(103-112)response(114-118)
components/github/github.app.mjs (1)
components/github/actions/update-pull-request/update-pull-request.mjs (1)
data(88-88)
⏰ 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). (4)
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
- GitHub Check: Verify TypeScript components
- GitHub Check: pnpm publish
🔇 Additional comments (55)
components/github/actions/create-gist/create-gist.mjs (1)
8-8: Version bump appears to be part of coordinated release—verify intent.This is a patch-level version bump with no functional changes. The AI summary indicates many component versions were updated. Confirm this is intentional coordinated versioning.
Note: The PR objectives describe adding an "Update Pull Request" action, but this file is for creating gists. Confirm the actual
update-pull-requestaction file is included in this PR review.components/github/sources/new-review-request/new-review-request.mjs (1)
8-8: Version bump is appropriate.The minor version increment from 0.2.5 to 0.2.6 is appropriate for a documentation update, assuming the API version in the documentation URL is corrected.
components/github/actions/get-repository-content/get-repository-content.mjs (1)
7-7: LGTM: Version bumpThe version increment from 0.1.5 to 0.1.6 is appropriate for this release cycle. No functional changes detected.
components/github/actions/star-repo/star-repo.mjs (1)
8-8: LGTM: Version bumpThe version increment from 0.0.5 to 0.0.6 is appropriate for this release cycle. No functional changes detected.
components/github/sources/new-or-updated-pull-request/new-or-updated-pull-request.mjs (1)
12-12: LGTM: Version bumpThe version increment from 1.2.8 to 1.2.9 is appropriate for this release cycle. No functional changes detected.
components/github/sources/new-or-updated-issue/new-or-updated-issue.mjs (1)
12-12: LGTM: Version bumpThe version increment from 1.1.8 to 1.1.9 is appropriate for this release cycle. No functional changes detected.
components/github/actions/create-workflow-dispatch/create-workflow-dispatch.mjs (1)
8-8: LGTM: Version bumpThe version increment from 0.0.5 to 0.0.6 is appropriate for this release cycle. No functional changes detected.
components/github/sources/new-commit/new-commit.mjs (1)
11-11: LGTM: Version bumpThe version increment from 1.0.12 to 1.0.13 is appropriate for this release cycle. No functional changes detected.
components/github/sources/new-star-by-user/new-star-by-user.mjs (1)
8-8: LGTM: Version bumpThe version increment from 0.0.10 to 0.0.11 is appropriate for this release cycle. No functional changes detected.
components/github/actions/list-releases/list-releases.mjs (1)
7-7: LGTM: Version bumpThe version increment from 0.0.11 to 0.0.12 is appropriate for this release cycle. No functional changes detected.
components/github/actions/list-workflow-runs/list-workflow-runs.mjs (1)
7-7: Version bump is appropriate.This is a straightforward metadata version update aligned with the broader component release cycle.
components/github/actions/get-commit/get-commit.mjs (1)
7-7: Version bump is appropriate.This is a straightforward metadata version update aligned with the broader component release cycle.
components/github/actions/list-commits/list-commits.mjs (1)
7-7: Version bump is appropriate.This is a straightforward metadata version update aligned with the broader component release cycle.
components/github/sources/new-workflow-run-completed/new-workflow-run-completed.mjs (1)
10-10: Version bump is appropriate.This is a straightforward metadata version update aligned with the broader component release cycle.
components/github/sources/new-issue-with-status/new-issue-with-status.mjs (1)
11-11: Version bump is appropriate.This is a straightforward metadata version update aligned with the broader component release cycle.
components/github/actions/update-gist/update-gist.mjs (1)
9-9: Version bump is appropriate.This is a straightforward metadata version update aligned with the broader component release cycle.
components/github/actions/get-issue-assignees/get-issue-assignees.mjs (1)
7-7: Version bump is appropriate.This is a straightforward metadata version update aligned with the broader component release cycle.
components/github/sources/new-card-in-column/new-card-in-column.mjs (1)
10-10: Version bump is appropriate.This is a straightforward metadata version update aligned with the broader component release cycle.
components/github/sources/new-collaborator/new-collaborator.mjs (1)
11-11: LGTM! Version bump aligns with the coordinated release.This metadata-only update is appropriate for the package release that introduces the new update-pull-request action.
components/github/sources/new-label/new-label.mjs (1)
11-11: LGTM! Version bump aligns with the coordinated release.This metadata-only update is appropriate for the package release.
components/github/sources/new-issue-comment/new-issue-comment.mjs (1)
11-11: LGTM! Version bump aligns with the coordinated release.This metadata-only update is appropriate for the package release.
components/github/actions/get-workflow-run/get-workflow-run.mjs (1)
7-7: LGTM! Version bump aligns with the coordinated release.This metadata-only update is appropriate for the package release.
components/github/sources/new-release/new-release.mjs (1)
11-11: LGTM! Version bump aligns with the coordinated release.This metadata-only update is appropriate for the package release.
components/github/actions/get-repository/get-repository.mjs (1)
7-7: LGTM! Version bump aligns with the coordinated release.This metadata-only update is appropriate for the package release.
components/github/actions/create-branch/create-branch.mjs (1)
8-8: LGTM! Version bump aligns with the coordinated release.This metadata-only update is appropriate for the package release.
components/github/sources/new-branch/new-branch.mjs (1)
11-11: LGTM! Version bump aligns with the coordinated release.This metadata-only update is appropriate for the package release.
components/github/sources/new-or-updated-milestone/new-or-updated-milestone.mjs (1)
12-12: Version metadata bump looks goodThe source version is incremented to
1.1.9with no logic changes; consistent with a release-only bump.components/github/actions/search-issues-and-pull-requests/search-issues-and-pull-requests.mjs (1)
7-7: Search action version bump is consistentAction version updated to
0.2.8with unchanged run logic; fine as part of the release sweep.components/github/actions/get-reviewers/get-reviewers.mjs (1)
9-9: Get-reviewers action version bump OKMetadata version raised to
0.1.6; existing props and run logic remain intact.components/github/actions/enable-workflow/enable-workflow.mjs (1)
7-7: Enable-workflow action version increment is fineVersion updated to
0.0.6with no logic changes; aligns with the broader version bump pattern.components/github/sources/new-discussion/new-discussion.mjs (1)
11-11: New-discussion source version bump approvedSource version set to
1.0.12; no functional differences introduced.components/github/actions/create-pull-request/create-pull-request.mjs (1)
8-8: Create-pull-request action version bump looks correctAction version moved to
0.1.6with unchanged validation and request-building logic; suitable for a non-breaking release bump.components/github/actions/get-current-user/get-current-user.mjs (1)
10-10: Get-current-user action version update is fineVersion incremented to
0.0.2; behavior and response shape remain identical.components/github/actions/create-or-update-file-contents/create-or-update-file-contents.mjs (1)
7-7: LGTM - Version bump only.Patch version increment with no functional changes.
components/github/sources/new-workflow-job-completed/new-workflow-job-completed.mjs (1)
10-10: LGTM - Version bump only.Patch version increment with no functional changes.
components/github/sources/new-fork/new-fork.mjs (1)
11-11: LGTM - Version bump only.Patch version increment with no functional changes.
components/github/sources/webhook-events/webhook-events.mjs (1)
11-11: LGTM - Version bump only.Patch version increment with no functional changes.
components/github/actions/update-issue/update-issue.mjs (1)
13-13: LGTM - Version bump only.Patch version increment with no functional changes.
components/github/actions/create-issue-comment/create-issue-comment.mjs (1)
7-7: LGTM - Version bump only.Patch version increment with no functional changes.
components/github/actions/list-gists-for-a-user/list-gists-for-a-user.mjs (1)
8-8: LGTM - Version bump only.Patch version increment with no functional changes.
components/github/sources/new-commit-comment/new-commit-comment.mjs (1)
11-11: LGTM - Version bump only.Patch version increment with no functional changes.
components/github/sources/new-star/new-star.mjs (1)
11-11: LGTM: Version bumpThe version increment from 1.0.11 to 1.0.12 is appropriate for this metadata update.
components/github/actions/disable-workflow/disable-workflow.mjs (1)
8-8: LGTM: Version bumpThe version increment from 0.0.5 to 0.0.6 is appropriate for this metadata update.
components/github/actions/create-issue/create-issue.mjs (1)
9-9: LGTM: Version bumpThe version increment from 0.3.6 to 0.3.7 is appropriate for this metadata update.
components/github/actions/update-project-v2-item-status/update-project-v2-item-status.mjs (1)
7-7: LGTM: Version bumpThe version increment from 0.0.8 to 0.0.9 is appropriate for this metadata update.
components/github/sources/new-team/new-team.mjs (1)
8-8: LGTM: Version bumpThe version increment from 0.2.5 to 0.2.6 is appropriate.
components/github/sources/new-notification/new-notification.mjs (1)
8-8: LGTM: Version bumpThe version increment from 0.2.5 to 0.2.6 is appropriate.
components/github/sources/new-gist/new-gist.mjs (1)
8-8: LGTM: Version bumpThe version increment from 0.2.5 to 0.2.6 is appropriate.
components/github/sources/new-organization/new-organization.mjs (1)
8-8: LGTM: Version bumpThe version increment from 0.2.5 to 0.2.6 is appropriate.
components/github/sources/new-mention/new-mention.mjs (1)
7-8: Metadata update looks goodDescription link and version bump are consistent with the broader API-version alignment; no behavioral changes introduced.
components/github/sources/new-security-alert/new-security-alert.mjs (1)
7-8: Security alert source metadata is alignedDescription and version bump match the new notifications API versioning; behavior of the source remains unchanged.
components/github/sources/new-repository/new-repository.mjs (1)
7-8: Repository source metadata change is safeUpdated description URL and version bump are consistent with other GitHub sources; no functional impact.
components/github/package.json (1)
3-3: GitHub components package version bump is appropriateRaising
@pipedream/githubto1.9.0matches the addition of new functionality (update pull request) and other component version bumps.components/github/actions/create-repository/create-repository.mjs (1)
7-7: Create Repository action version bump onlyIncrementing the action version to
0.0.19with unchanged behavior is consistent with the overall GitHub package release.components/github/github.app.mjs (1)
602-608:updatePullRequesthelper matches existing patternsThe new
updatePullRequestmethod mirrors other helpers (e.g.,createPullRequest,updateIssue) by delegating to Octokit with the correct PATCH route and returningresponse.data. This is a clean, minimal extension of the app API.Please double‑check this route and parameters against the latest GitHub “Update a pull request” REST docs to ensure no additional required fields or headers are needed.
2da020f to
6266946
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
♻️ Duplicate comments (8)
components/github/sources/new-review-request/new-review-request.mjs (1)
7-8: The malformed API version format issue persists.The API version string
20.2.61-28in the documentation URL remains invalid. As previously noted, GitHub REST API versions use the YYYY-MM-DD date format (e.g.,2022-11-28), not the format shown here. The version bump to 0.2.6 is fine.Apply this diff to fix the API version format:
- description: "Emit new event for new review request notifications. [See the documentation](https://docs.github.com/en/rest/activity/notifications?apiVersion=20.2.61-28#list-notifications-for-the-authenticated-user)", + description: "Emit new event for new review request notifications. [See the documentation](https://docs.github.com/en/rest/activity/notifications?apiVersion=2022-11-28#list-notifications-for-the-authenticated-user)",components/github/sources/new-notification/new-notification.mjs (1)
7-8: The malformed API version format issue persists.The API version string
20.2.61-28in the documentation URL remains invalid. As previously noted, GitHub REST API versions use the YYYY-MM-DD date format (e.g.,2022-11-28). The version bump to 0.2.6 is fine.Apply this diff to fix the API version format:
- description: "Emit new event when the authenticated user receives a new notification. [See the documentation](https://docs.github.com/en/rest/activity/notifications?apiVersion=20.2.61-28#list-notifications-for-the-authenticated-user)", + description: "Emit new event when the authenticated user receives a new notification. [See the documentation](https://docs.github.com/en/rest/activity/notifications?apiVersion=2022-11-28#list-notifications-for-the-authenticated-user)",components/github/sources/new-gist/new-gist.mjs (1)
7-8: Typo and malformed API version format issues persist.Two previously identified issues remain unfixed:
- Typo: "documentatoion" should be "documentation"
- The API version string
20.2.61-28is invalid; GitHub REST API versions use YYYY-MM-DD format (e.g.,2022-11-28)The version bump to 0.2.6 is fine.
Apply this diff to fix both issues:
- description: "Emit new events when new gists are created by the authenticated user. [See the documentatoion](https://docs.github.com/en/rest/gists/gists?apiVersion=20.2.61-28#list-gists-for-the-authenticated-user)", + description: "Emit new events when new gists are created by the authenticated user. [See the documentation](https://docs.github.com/en/rest/gists/gists?apiVersion=2022-11-28#list-gists-for-the-authenticated-user)",components/github/sources/new-team/new-team.mjs (1)
7-7: API version format issue already flagged.Past review comments have already identified the malformed API version string
20.2.61-28in the documentation URL.components/github/sources/new-organization/new-organization.mjs (1)
7-7: API version format issue already flagged.Past review comments have already identified the malformed API version string in the documentation URL.
components/github/actions/update-pull-request/update-pull-request.mjs (3)
102-105: Critical: Branch name parsing fails for branches containing "/".Line 104 uses
base.split("/")[1]to extract the branch name from thesha/branchnameformat. This breaks for branch names containing/(common patterns likefeature/my-featureorbugfix/issue-123), as it would only extract the first segment instead of the full branch name.Apply this diff to correctly extract the branch name:
if (base) { // Extract branch name from the branch prop format (sha/branchname) - data.base = base.split("/")[1]; + // Handle branch names that contain "/" + data.base = base.split("/").slice(1).join("/"); }Note: This same pattern appears in
create-pull-request.mjs(lines 103-104) andcreate-or-update-file-contents.mjs(line 57), suggesting a codebase-wide issue that should be addressed consistently.
107-111: Fixmaintainer_can_modifylogic to handle explicitfalsevalues.The GitHub API distinguishes between omitting the field (don't change current setting) and explicitly sending
maintainer_can_modify: false(disable modification). The current code only sends the field whentrue, which means explicitly settingmaintainerCanModifytofalseis silently ignored instead of disabling cross-repo modifications.Apply this diff to handle both
trueandfalsevalues:- // Only include maintainer_can_modify if explicitly set to true - // This field only applies to cross-repo pull requests (from forks) - if (maintainerCanModify === true) { - data.maintainer_can_modify = maintainerCanModify; + // Only include maintainer_can_modify if explicitly provided (true or false) + // Omitting the field means "don't change"; this field only applies to cross-repo PRs + if (maintainerCanModify !== undefined) { + data.maintainer_can_modify = maintainerCanModify; }
119-119: Use PR number in summary for better UX.The summary currently uses
response.id(the internal GitHub ID), which is less meaningful to users than the PR number they selected.Based on learnings.
Apply this diff:
- $.export("$summary", `Successfully updated pull request with ID \`${response.id}\``); + $.export("$summary", `Successfully updated pull request #${pullNumber}.`);This matches how users reference PRs in GitHub and avoids depending on the response shape.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (56)
components/github/actions/create-branch/create-branch.mjs(1 hunks)components/github/actions/create-gist/create-gist.mjs(1 hunks)components/github/actions/create-issue-comment/create-issue-comment.mjs(1 hunks)components/github/actions/create-issue/create-issue.mjs(1 hunks)components/github/actions/create-or-update-file-contents/create-or-update-file-contents.mjs(1 hunks)components/github/actions/create-pull-request/create-pull-request.mjs(1 hunks)components/github/actions/create-repository/create-repository.mjs(1 hunks)components/github/actions/create-workflow-dispatch/create-workflow-dispatch.mjs(1 hunks)components/github/actions/disable-workflow/disable-workflow.mjs(1 hunks)components/github/actions/enable-workflow/enable-workflow.mjs(1 hunks)components/github/actions/get-commit/get-commit.mjs(1 hunks)components/github/actions/get-current-user/get-current-user.mjs(1 hunks)components/github/actions/get-issue-assignees/get-issue-assignees.mjs(1 hunks)components/github/actions/get-repository-content/get-repository-content.mjs(1 hunks)components/github/actions/get-repository/get-repository.mjs(1 hunks)components/github/actions/get-reviewers/get-reviewers.mjs(1 hunks)components/github/actions/get-workflow-run/get-workflow-run.mjs(1 hunks)components/github/actions/list-commits/list-commits.mjs(1 hunks)components/github/actions/list-gists-for-a-user/list-gists-for-a-user.mjs(1 hunks)components/github/actions/list-releases/list-releases.mjs(1 hunks)components/github/actions/list-workflow-runs/list-workflow-runs.mjs(1 hunks)components/github/actions/search-issues-and-pull-requests/search-issues-and-pull-requests.mjs(1 hunks)components/github/actions/star-repo/star-repo.mjs(1 hunks)components/github/actions/update-gist/update-gist.mjs(1 hunks)components/github/actions/update-issue/update-issue.mjs(1 hunks)components/github/actions/update-project-v2-item-status/update-project-v2-item-status.mjs(1 hunks)components/github/actions/update-pull-request/update-pull-request.mjs(1 hunks)components/github/github.app.mjs(1 hunks)components/github/package.json(1 hunks)components/github/sources/new-branch/new-branch.mjs(1 hunks)components/github/sources/new-card-in-column/new-card-in-column.mjs(1 hunks)components/github/sources/new-collaborator/new-collaborator.mjs(1 hunks)components/github/sources/new-commit-comment/new-commit-comment.mjs(1 hunks)components/github/sources/new-commit/new-commit.mjs(1 hunks)components/github/sources/new-discussion/new-discussion.mjs(1 hunks)components/github/sources/new-fork/new-fork.mjs(1 hunks)components/github/sources/new-gist/new-gist.mjs(1 hunks)components/github/sources/new-issue-comment/new-issue-comment.mjs(1 hunks)components/github/sources/new-issue-with-status/new-issue-with-status.mjs(1 hunks)components/github/sources/new-label/new-label.mjs(1 hunks)components/github/sources/new-mention/new-mention.mjs(1 hunks)components/github/sources/new-notification/new-notification.mjs(1 hunks)components/github/sources/new-or-updated-issue/new-or-updated-issue.mjs(1 hunks)components/github/sources/new-or-updated-milestone/new-or-updated-milestone.mjs(1 hunks)components/github/sources/new-or-updated-pull-request/new-or-updated-pull-request.mjs(1 hunks)components/github/sources/new-organization/new-organization.mjs(1 hunks)components/github/sources/new-release/new-release.mjs(1 hunks)components/github/sources/new-repository/new-repository.mjs(1 hunks)components/github/sources/new-review-request/new-review-request.mjs(1 hunks)components/github/sources/new-security-alert/new-security-alert.mjs(1 hunks)components/github/sources/new-star-by-user/new-star-by-user.mjs(1 hunks)components/github/sources/new-star/new-star.mjs(1 hunks)components/github/sources/new-team/new-team.mjs(1 hunks)components/github/sources/new-workflow-job-completed/new-workflow-job-completed.mjs(1 hunks)components/github/sources/new-workflow-run-completed/new-workflow-run-completed.mjs(1 hunks)components/github/sources/webhook-events/webhook-events.mjs(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-07-04T18:11:59.822Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Applied to files:
components/github/actions/update-pull-request/update-pull-request.mjs
🧬 Code graph analysis (2)
components/github/actions/update-pull-request/update-pull-request.mjs (3)
components/github/actions/create-or-update-file-contents/create-or-update-file-contents.mjs (2)
data(53-55)response(56-59)components/github/actions/create-pull-request/create-pull-request.mjs (2)
data(103-112)response(114-118)components/github/actions/update-issue/update-issue.mjs (2)
data(40-42)response(43-47)
components/github/github.app.mjs (2)
components/github/actions/get-reviewers/get-reviewers.mjs (1)
pullNumber(74-74)components/github/actions/update-pull-request/update-pull-request.mjs (1)
data(88-88)
⏰ 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). (4)
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (53)
components/github/actions/disable-workflow/disable-workflow.mjs (1)
8-8: LGTM! Routine version bump.The version increment from "0.0.5" to "0.0.6" is a metadata-only change with no functional modifications. This appears to be part of the coordinated package version bump mentioned in the PR.
components/github/actions/search-issues-and-pull-requests/search-issues-and-pull-requests.mjs (1)
7-7: LGTM - Maintenance version bump.The patch version increment with no functional changes is consistent with the broader package update described in the PR.
components/github/sources/new-star/new-star.mjs (1)
11-11: Version bump is straightforward and safeOnly the
versionfield changed, with no logic modifications; this metadata update looks consistent with the wider GitHub component release.components/github/sources/new-or-updated-pull-request/new-or-updated-pull-request.mjs (1)
12-12: Metadata-only version increment looks goodThe
versionbump to"1.2.9"is isolated and does not alter behavior; safe to ship.components/github/actions/create-workflow-dispatch/create-workflow-dispatch.mjs (1)
8-8: Action version bump is consistent and non-breakingOnly the action
versionmoved to"0.0.6"; logic and error handling remain intact.components/github/sources/new-commit/new-commit.mjs (1)
11-11: Source version bump only; behavior unchangedUpdating the
versionto"1.0.13"is isolated and preserves existing commit emission logic.components/github/actions/get-commit/get-commit.mjs (1)
7-7: Non-functional version update is acceptableThe
versionfield change to"0.0.4"is purely declarative and leaves the action’s behavior untouched.components/github/actions/list-commits/list-commits.mjs (1)
7-7: LGTM: Version bump is appropriate.The metadata version update is consistent with the PR-wide versioning refresh.
components/github/sources/webhook-events/webhook-events.mjs (1)
11-11: LGTM: Version bump is appropriate.The metadata version update is consistent with the PR-wide versioning refresh.
components/github/sources/new-or-updated-issue/new-or-updated-issue.mjs (1)
12-12: LGTM: Version bump is appropriate.The metadata version update is consistent with the PR-wide versioning refresh.
components/github/actions/create-gist/create-gist.mjs (1)
8-8: LGTM: Version bump is appropriate.The metadata version update is consistent with the PR-wide versioning refresh.
components/github/sources/new-issue-with-status/new-issue-with-status.mjs (1)
11-11: LGTM: Version bump is appropriate.The metadata version update is consistent with the PR-wide versioning refresh.
components/github/sources/new-fork/new-fork.mjs (1)
11-11: LGTM: Version bump is appropriate.The metadata version update is consistent with the PR-wide versioning refresh.
components/github/sources/new-star-by-user/new-star-by-user.mjs (1)
8-8: LGTM: Version bump is appropriate.The metadata version update is consistent with the PR-wide versioning refresh.
components/github/actions/create-pull-request/create-pull-request.mjs (1)
8-8: LGTM - Version bump.Standard patch version increment to align with the package update that includes the new update-pull-request action.
components/github/sources/new-card-in-column/new-card-in-column.mjs (1)
10-10: LGTM - Version bump.Routine patch version increment for package release alignment.
components/github/actions/list-gists-for-a-user/list-gists-for-a-user.mjs (1)
8-8: LGTM - Version bump.Patch version increment consistent with package release.
components/github/actions/get-reviewers/get-reviewers.mjs (1)
9-9: LGTM - Version bump.Standard patch version increment.
components/github/sources/new-label/new-label.mjs (1)
11-11: LGTM - Version bump.Routine patch version increment for package alignment.
components/github/actions/get-repository-content/get-repository-content.mjs (1)
7-7: LGTM - Version bump.Standard patch version increment for package release.
components/github/sources/new-release/new-release.mjs (1)
11-11: LGTM - Version bump.Standard patch version increment.
components/github/actions/create-or-update-file-contents/create-or-update-file-contents.mjs (1)
7-7: LGTM - Version bump.Patch version increment consistent with package release.
components/github/actions/get-workflow-run/get-workflow-run.mjs (1)
7-7: LGTM - Version bump for ecosystem synchronization.The version increment from 0.0.5 to 0.0.6 is appropriate as part of the repository-wide version alignment accompanying the new update-pull-request feature.
components/github/actions/list-workflow-runs/list-workflow-runs.mjs (1)
7-7: LGTM - Version bump aligned with package updates.The patch version increment is consistent with the broader version synchronization across GitHub actions in this release.
components/github/actions/list-releases/list-releases.mjs (1)
7-7: LGTM - Standard version increment.The version bump from 0.0.11 to 0.0.12 is appropriate for this release cycle.
components/github/package.json (1)
3-3: LGTM - Appropriate minor version bump for new feature.The version increment from 1.8.4 to 1.9.0 correctly follows semantic versioning for the addition of the new update-pull-request action and updatePullRequest method.
components/github/sources/new-commit-comment/new-commit-comment.mjs (1)
11-11: LGTM - Version synchronized with package update.The patch version increment aligns with the GitHub package update to 1.9.0.
components/github/actions/create-repository/create-repository.mjs (1)
7-7: LGTM - Routine version increment.The version bump from 0.0.18 to 0.0.19 is appropriate for this release.
components/github/sources/new-discussion/new-discussion.mjs (1)
11-11: LGTM - Version increment consistent with other sources.The patch version bump aligns with other GitHub source components in this release.
components/github/actions/star-repo/star-repo.mjs (1)
8-8: LGTM - Version synchronized with ecosystem updates.The version increment from 0.0.5 to 0.0.6 is appropriate and consistent with the broader version updates across GitHub actions.
components/github/sources/new-collaborator/new-collaborator.mjs (1)
11-11: LGTM: Version bump for package release.The version increment is appropriate for the package release that includes the new "Update Pull Request" action.
components/github/sources/new-or-updated-milestone/new-or-updated-milestone.mjs (1)
12-12: LGTM: Version bump for package release.The version increment is appropriate for the package release.
components/github/actions/enable-workflow/enable-workflow.mjs (1)
7-7: LGTM: Version bump for package release.The version increment is appropriate for the package release.
components/github/actions/get-current-user/get-current-user.mjs (1)
10-10: LGTM: Version bump for package release.The version increment is appropriate for the package release.
components/github/sources/new-workflow-job-completed/new-workflow-job-completed.mjs (1)
10-10: LGTM: Version bump for package release.The version increment is appropriate for the package release.
components/github/actions/create-issue/create-issue.mjs (1)
9-9: LGTM: Version bump for package release.The version increment is appropriate for the package release.
components/github/sources/new-workflow-run-completed/new-workflow-run-completed.mjs (1)
10-10: LGTM: Version bump for package release.The version increment is appropriate for the package release.
components/github/actions/update-issue/update-issue.mjs (1)
13-13: LGTM: Version bump for package release.The version increment is appropriate for the package release.
components/github/actions/update-gist/update-gist.mjs (1)
9-9: LGTM!Standard version bump with no functional changes.
components/github/actions/get-issue-assignees/get-issue-assignees.mjs (1)
7-7: LGTM!Standard version bump with no functional changes.
components/github/actions/update-project-v2-item-status/update-project-v2-item-status.mjs (1)
7-7: LGTM!Standard version bump with no functional changes.
components/github/actions/create-issue-comment/create-issue-comment.mjs (1)
7-7: LGTM!Standard version bump with no functional changes.
components/github/sources/new-issue-comment/new-issue-comment.mjs (1)
11-11: LGTM!Standard version bump with no functional changes.
components/github/sources/new-mention/new-mention.mjs (1)
8-8: Version bump is appropriate.Standard metadata update for the release.
components/github/sources/new-security-alert/new-security-alert.mjs (1)
7-8: Metadata updates are consistent with the broader version bump.The API version and module version changes follow the same pattern as other files in this PR.
components/github/sources/new-branch/new-branch.mjs (1)
11-11: Version bump is appropriate.Standard metadata update for the release.
components/github/actions/get-repository/get-repository.mjs (1)
7-7: Version bump is appropriate.Standard metadata update for the release.
components/github/sources/new-repository/new-repository.mjs (1)
7-8: Metadata updates are consistent with the broader version bump.components/github/sources/new-team/new-team.mjs (1)
8-8: Version bump is appropriate.components/github/sources/new-organization/new-organization.mjs (1)
8-8: Version bump is appropriate.components/github/github.app.mjs (1)
602-608: Implementation verified against GitHub REST API specification—approved.The
updatePullRequestmethod correctly implements the GitHub REST API endpoint. The PATCH method and path/repos/{owner}/{repo}/pulls/{pull_number}match the documented GitHub API specification, and the implementation appropriately returns the response data. The method follows established patterns and maintains consistency with similar methods in the codebase.components/github/actions/update-pull-request/update-pull-request.mjs (2)
3-13: LGTM!The action metadata is well-structured. The
destructiveHint: trueannotation appropriately flags this as a state-modifying operation, and the documentation reference is helpful.
14-74: LGTM!The prop definitions are well-structured with appropriate types, descriptions, and dynamic contexts. The state options correctly match the GitHub API constraints.
WHY
Resolves #19073
Summary by CodeRabbit