Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/github/actions/create-branch/create-branch.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "github-create-branch",
name: "Create Branch",
description: "Create a new branch in a GitHub repo. [See the documentation](https://docs.github.com/en/rest/git/refs?apiVersion=2022-11-28#create-a-reference)",
version: "0.0.19",
version: "0.0.20",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/github/actions/create-gist/create-gist.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "github-create-gist",
name: "Create Gist",
description: "Allows you to add a new gist with one or more files. [See the documentation](https://docs.github.com/en/rest/gists/gists?apiVersion=2022-11-28#create-a-gist)",
version: "0.0.12",
version: "0.0.13",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "github-create-issue-comment",
name: "Create Issue Comment",
description: "Create a new comment in a issue. [See the documentation](https://docs.github.com/en/rest/issues/comments#create-an-issue-comment)",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/github/actions/create-issue/create-issue.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "github-create-issue",
name: "Create Issue",
description: "Create a new issue in a GitHub repo. [See the documentation](https://docs.github.com/en/rest/issues/issues#create-an-issue)",
version: "0.3.6",
version: "0.3.7",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "github-create-or-update-file-contents",
name: "Create or Update File Contents",
description: "Create or update a file in a repository. [See the documentation](https://docs.github.com/en/rest/repos/contents#create-or-update-file-contents)",
version: "0.1.5",
version: "0.1.6",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "github-create-pull-request",
name: "Create Pull Request",
description: "Creates a new pull request for a specified repository. [See the documentation](https://docs.github.com/en/rest/pulls/pulls#create-a-pull-request)",
version: "0.1.5",
version: "0.1.6",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "github-create-repository",
name: "Create Repository",
description: "Creates a new repository for the authenticated user. [See the documentation](https://docs.github.com/en/rest/repos/repos#create-a-repository-for-the-authenticated-user)",
version: "0.0.18",
version: "0.0.19",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "github-create-workflow-dispatch",
name: "Create Workflow Dispatch",
description: "Creates a new workflow dispatch event. [See the documentation](https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event)",
version: "0.0.5",
version: "0.0.6",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "github-disable-workflow",
name: "Disable Workflow",
description: "Disables a workflow and sets the **state** of the workflow to **disabled_manually**. [See the documentation](https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#disable-a-workflow)",
version: "0.0.5",
version: "0.0.6",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "github-enable-workflow",
name: "Enable Workflow",
description: "Enables a workflow and sets the **state** of the workflow to **active**. [See the documentation](https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#enable-a-workflow)",
version: "0.0.5",
version: "0.0.6",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/github/actions/get-commit/get-commit.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "github-get-commit",
name: "Get Commit",
description: "Get a commit in a GitHub repo. [See the documentation](https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#get-a-commit)",
version: "0.0.3",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "github-get-current-user",
name: "Get Current 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 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).",
version: "0.0.1",
version: "0.0.2",
type: "action",
annotations: {
destructiveHint: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "github-get-issue-assignees",
name: "Get Issue Assignees",
description: "Get assignees for an issue in a GitHub repo. [See the documentation](https://docs.github.com/en/rest/issues/issues#get-an-issue)",
version: "0.0.24",
version: "0.0.25",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "github-get-repository-content",
name: "Get Repository Content",
description: "Get the content of a file or directory in a specific repository. [See the documentation](https://docs.github.com/en/rest/repos/contents#get-repository-content)",
version: "0.1.5",
version: "0.1.6",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "github-get-repository",
name: "Get Repository Info",
description: "Get information for a specific repository. [See the documentation](https://docs.github.com/en/rest/repos/repos#get-a-repository)",
version: "0.0.23",
version: "0.0.24",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/github/actions/get-reviewers/get-reviewers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "github-get-reviewers",
name: "Get Reviewers",
description: "Get reviewers for a PR ([see documentation](https://docs.github.com/en/rest/pulls/reviews#list-reviews-for-a-pull-request)) or Commit SHA ([see documentation](https://docs.github.com/en/rest/commits/commits#list-pull-requests-associated-with-a-commit)).",
version: "0.1.5",
version: "0.1.6",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "github-get-workflow-run",
name: "Get Workflow Run",
description: "Gets a specific workflow run. [See the documentation](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#get-a-workflow-run)",
version: "0.0.5",
version: "0.0.6",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/github/actions/list-commits/list-commits.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "github-list-commits",
name: "List Commits",
description: "List commits in a GitHub repo. [See the documentation](https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#list-commits)",
version: "0.0.3",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
key: "github-list-gists-for-a-user",
name: "List Gists for a User",
description: "Lists public gists for the specified user. [See the documentation](https://docs.github.com/en/rest/gists/gists?apiVersion=2022-11-28#list-gists-for-a-user)",
version: "0.1.5",
version: "0.1.6",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand All @@ -13,7 +13,7 @@
},
type: "action",
props: {
github: {

Check warning on line 16 in components/github/actions/list-gists-for-a-user/list-gists-for-a-user.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop github must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 16 in components/github/actions/list-gists-for-a-user/list-gists-for-a-user.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop github must have a label. See https://pipedream.com/docs/components/guidelines/#props
...github,
reloadProps: true,
},
Expand Down
2 changes: 1 addition & 1 deletion components/github/actions/list-releases/list-releases.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "github-list-releases",
name: "List Releases",
description: "List releases for a repository [See the documentation](https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#list-releases)",
version: "0.0.11",
version: "0.0.12",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "github-list-workflow-runs",
name: "List Workflow Runs",
description: "List workflowRuns for a repository [See the documentation](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository)",
version: "0.0.5",
version: "0.0.6",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
key: "github-search-issues-and-pull-requests",
name: "Search Issues and Pull Requests",
description: "Find issues and pull requests by state and keyword. [See the documentation](https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests)",
version: "0.2.7",
version: "0.2.8",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand All @@ -13,7 +13,7 @@
type: "action",
props: {
github,
infoBox: {

Check warning on line 16 in components/github/actions/search-issues-and-pull-requests/search-issues-and-pull-requests.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop infoBox must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 16 in components/github/actions/search-issues-and-pull-requests/search-issues-and-pull-requests.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop infoBox must have a label. See https://pipedream.com/docs/components/guidelines/#props
type: "alert",
alertType: "info",
content: `Example query: \`bug report in:title type:issue repo:octocat/Hello-World\`
Expand Down
2 changes: 1 addition & 1 deletion components/github/actions/star-repo/star-repo.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "github-star-repo",
name: "Star Repo",
description: "Star a repository. [See the docs](https://docs.github.com/en/rest/activity/starring?apiVersion=2022-11-28#star-a-repository-for-the-authenticated-user) for more info.",
version: "0.0.5",
version: "0.0.6",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/github/actions/update-gist/update-gist.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
key: "github-update-gist",
name: "Update Gist",
description: "Allows you to update a gist's description and to update, delete, or rename gist files. [See the documentation](https://docs.github.com/en/rest/gists/gists?apiVersion=2022-11-28#update-a-gist)",
version: "0.0.12",
version: "0.0.13",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand All @@ -15,7 +15,7 @@
type: "action",
props: {
github,
infoAlert: {

Check warning on line 18 in components/github/actions/update-gist/update-gist.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop infoAlert must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 18 in components/github/actions/update-gist/update-gist.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop infoAlert must have a label. See https://pipedream.com/docs/components/guidelines/#props
type: "alert",
alertType: "info",
content: "Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. At least one of description or files is required.",
Expand Down
2 changes: 1 addition & 1 deletion components/github/actions/update-issue/update-issue.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default {
key: "github-update-issue",
name: "Update Issue",
description: "Update a new issue in a GitHub repo. [See the documentation](https://docs.github.com/en/rest/issues/issues#update-an-issue)",
version: "0.2.6",
version: "0.2.7",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "github-update-project-v2-item-status",
name: "Update Project (V2) Item Status",
description: "Update the status of an item in the selected Project (V2). [See the documentation](https://docs.github.com/en/graphql/reference/mutations#updateprojectv2itemfieldvalue)",
version: "0.0.8",
version: "0.0.9",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
123 changes: 123 additions & 0 deletions components/github/actions/update-pull-request/update-pull-request.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
import github from "../../github.app.mjs";

export default {
key: "github-update-pull-request",
name: "Update Pull Request",
description: "Updates an existing pull request with new title, body, state, or base branch. [See the documentation](https://docs.github.com/en/rest/pulls/pulls#update-a-pull-request)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
props: {
github,
repoFullname: {
propDefinition: [
github,
"repoFullname",
],
label: "Repository",
description: "The repository where the pull request exists.",
},
pullNumber: {
propDefinition: [
github,
"pullNumber",
(c) => ({
repoFullname: c.repoFullname,
}),
],
label: "Pull Request Number",
description: "The number of the pull request to update.",
},
title: {
label: "Title",
description: "The title of the pull request.",
type: "string",
optional: true,
},
body: {
label: "Body",
description: "The contents of the pull request body. Supports markdown.",
type: "string",
optional: true,
},
state: {
label: "State",
description: "The desired state of the pull request.",
type: "string",
optional: true,
options: [
"open",
"closed",
],
},
base: {
propDefinition: [
github,
"branch",
(c) => ({
repoFullname: c.repoFullname,
}),
],
label: "Base Branch",
description: "The name of the branch you want your changes pulled into. This should be an existing branch on the current repository.",
optional: true,
},
maintainerCanModify: {
label: "Maintainers Can Modify",
description: "Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.",
type: "boolean",
optional: true,
},
},
async run({ $ }) {
const {
github,
repoFullname,
pullNumber,
title,
body,
state,
base,
maintainerCanModify,
} = this;

const data = {};

if (title) {
data.title = title;
}

if (body) {
data.body = body;
}

if (state) {
data.state = state;
}

if (base) {
// Extract branch name from the branch prop format (sha/branchname)
data.base = base.split("/")[1];
}

// 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;
}

const response = await github.updatePullRequest({
repoFullname,
pullNumber,
data,
});

$.export("$summary", `Successfully updated pull request with ID \`${response.id}\``);

return response;
},
};
7 changes: 7 additions & 0 deletions components/github/github.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,13 @@ export default {

return response.data;
},
async updatePullRequest({
repoFullname, pullNumber, data,
}) {
const response = await this._client().request(`PATCH /repos/${repoFullname}/pulls/${pullNumber}`, data);

return response.data;
},
async getIssue({
repoFullname, issueNumber,
}) {
Expand Down
2 changes: 1 addition & 1 deletion components/github/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/github",
"version": "1.8.4",
"version": "1.9.0",
"description": "Pipedream GitHub Components",
"main": "github.app.mjs",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion components/github/sources/new-branch/new-branch.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
key: "github-new-branch",
name: "New Branch Created",
description: "Emit new event when a branch is created.",
version: "1.0.11",
version: "1.0.12",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "github-new-card-in-column",
name: "New Card in Column (Classic Projects)",
description: "Emit new event when a (classic) project card is created or moved to a specific column. For Projects V2 use `New Issue with Status` trigger. [More information here](https://docs.github.com/en/issues/organizing-your-work-with-project-boards/tracking-work-with-project-boards/adding-issues-and-pull-requests-to-a-project-board)",
version: "1.0.10",
version: "1.0.11",
type: "source",
props: {
...common.props,
Expand Down
Loading
Loading