From d4c413b747ee7a1c2ab40622b813233efe5032bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilherme=20Falc=C3=A3o?= <48412907+GTFalcao@users.noreply.github.com> Date: Fri, 27 Sep 2024 22:08:21 -0300 Subject: [PATCH] GitHub app actions improvements (#14058) * Create Issue adjustments + get push permission + improvements * Create Issue + async props * Get Repository improvements * Search issues/prs improvements * "Create or Update file contents" improvements * Get Repository Contents adjustments * Create Branch text adjustments * Text updates * Adding pagination to issues * Update Issue adjustments * Get Reviewers + adjustments * List Gists and Update Gist updates * Create Pull Request improvements * Version bumps * Version bumps * Update components/github/actions/create-branch/create-branch.mjs * Fix typos * Fixing 'create or update file contents' branch prop * Filtering out PRs from issueNumber prop * Adjusting branch on 'Get Repository Content' * Changing default review states to all * Fixing 'list gists for user' * Fix * Improve reviewStates prop description * Fixing syntax error in 'create or update file contents' * Adjusting branch name syntax * Fix: including branch when fetching file SHA * Version bump * Version bumps --------- Co-authored-by: Leo Vu --- .../easy_peasy_ai/easy_peasy_ai.app.mjs | 2 +- .../github/actions/common/asyncProps.mjs | 60 +++++++++++++++ .../actions/create-branch/create-branch.mjs | 8 +- .../actions/create-gist/create-gist.mjs | 4 +- .../create-issue-comment.mjs | 4 +- .../actions/create-issue/create-issue.mjs | 69 +++++++++--------- .../create-or-update-file-contents.mjs | 30 ++++---- .../create-pull-request.mjs | 72 +++++------------- .../create-repository/create-repository.mjs | 4 +- .../get-issue-assignees.mjs | 4 +- .../get-repository-content.mjs | 51 ++++++++----- .../actions/get-repository/get-repository.mjs | 11 +-- .../actions/get-reviewers/get-reviewers.mjs | 54 +++++++------- .../list-gists-for-a-user.mjs | 41 ++++++++--- .../actions/list-releases/list-releases.mjs | 4 +- .../search-issues-and-pull-requests.mjs | 21 ++++-- .../actions/update-gist/update-gist.mjs | 9 ++- .../actions/update-issue/update-issue.mjs | 73 +++++-------------- .../update-project-v2-item-status.mjs | 2 +- components/github/common/utils.mjs | 44 +++++------ components/github/github.app.mjs | 49 +++++++++++-- components/github/package.json | 2 +- .../github/sources/common/common-flex.mjs | 5 +- .../github/sources/common/common-webhook.mjs | 2 +- components/github/sources/common/utils.mjs | 10 --- .../github/sources/new-branch/new-branch.mjs | 2 +- .../new-card-in-column/new-card-in-column.mjs | 2 +- .../new-collaborator/new-collaborator.mjs | 2 +- .../new-commit-comment/new-commit-comment.mjs | 2 +- .../github/sources/new-commit/new-commit.mjs | 2 +- .../sources/new-discussion/new-discussion.mjs | 2 +- .../github/sources/new-fork/new-fork.mjs | 2 +- .../github/sources/new-gist/new-gist.mjs | 2 +- .../new-issue-with-status.mjs | 2 +- .../github/sources/new-label/new-label.mjs | 2 +- .../sources/new-mention/new-mention.mjs | 2 +- .../new-notification/new-notification.mjs | 2 +- .../new-or-updated-issue.mjs | 2 +- .../new-or-updated-milestone.mjs | 2 +- .../new-or-updated-pull-request.mjs | 2 +- .../new-organization/new-organization.mjs | 2 +- .../sources/new-release/new-release.mjs | 2 +- .../sources/new-repository/new-repository.mjs | 2 +- .../new-review-request/new-review-request.mjs | 2 +- .../new-security-alert/new-security-alert.mjs | 2 +- .../new-star-by-user/new-star-by-user.mjs | 2 +- .../github/sources/new-star/new-star.mjs | 2 +- .../github/sources/new-team/new-team.mjs | 2 +- .../sources/webhook-events/webhook-events.mjs | 2 +- components/l2s/l2s.app.mjs | 2 +- components/langbase/langbase.app.mjs | 2 +- components/pixelbin/pixelbin.app.mjs | 2 +- components/smslink_nc/smslink_nc.app.mjs | 2 +- .../tricentis_qtest/tricentis_qtest.app.mjs | 2 +- components/vida/vida.app.mjs | 2 +- 55 files changed, 381 insertions(+), 314 deletions(-) create mode 100644 components/github/actions/common/asyncProps.mjs diff --git a/components/easy_peasy_ai/easy_peasy_ai.app.mjs b/components/easy_peasy_ai/easy_peasy_ai.app.mjs index 480321f6d7a6a..cf43813292e38 100644 --- a/components/easy_peasy_ai/easy_peasy_ai.app.mjs +++ b/components/easy_peasy_ai/easy_peasy_ai.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/github/actions/common/asyncProps.mjs b/components/github/actions/common/asyncProps.mjs new file mode 100644 index 0000000000000..178bf3e5f1734 --- /dev/null +++ b/components/github/actions/common/asyncProps.mjs @@ -0,0 +1,60 @@ +export default { + assignees: { + label: "Assignees", + description: "One or more Users to assign to this issue", + type: "string[]", + optional: true, + options: async () => { + const collaborators = await this.github.getRepositoryCollaborators({ + repoFullname: this.repoFullname, + }); + + return collaborators.map(({ login }) => login); + }, + }, + labels: { + label: "Labels", + description: "The label(s) to add to the issue", + type: "string[]", + optional: true, + options: async () => { + const labels = await this.github.getRepositoryLabels({ + repoFullname: this.repoFullname, + }); + + return labels.map(({ name }) => name); + }, + }, + milestoneNumber: { + type: "integer", + label: "Milestone Number", + description: "The number of a milestone to associate the issue with", + optional: true, + options: async () => { + const items = await this.github.getRepositoryMilestones({ + repoFullname: this.repoFullname, + }); + + return items.map((item) => ({ + label: item.title, + value: +item.number, + })); + }, + }, + pullNumber: { + type: "integer", + label: "Pull Request Number", + description: "The pull request to get reviewers for", + options: async ({ page }) => { + const prs = await this.github.getRepositoryPullRequests({ + page: page + 1, + repoFullname: this.repoFullname, + }); + + return prs.map((pr) => ({ + label: pr.title, + value: +pr.number, + })); + }, + }, +}; diff --git a/components/github/actions/create-branch/create-branch.mjs b/components/github/actions/create-branch/create-branch.mjs index 4225e953de687..e3b97390b8e3e 100644 --- a/components/github/actions/create-branch/create-branch.mjs +++ b/components/github/actions/create-branch/create-branch.mjs @@ -4,8 +4,8 @@ import github from "../../github.app.mjs"; export default { key: "github-create-branch", name: "Create Branch", - description: "Create a new branch in a Github repo. [See docs here](https://docs.github.com/en/rest/git/refs?apiVersion=2022-11-28#create-a-reference)", - version: "0.0.12", + 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.13", type: "action", props: { github, @@ -17,12 +17,12 @@ export default { }, branchName: { label: "Branch Name", - description: "The name of the new branch that will be crated", + description: "The name of the new branch that will be created", type: "string", }, branchSha: { label: "Source Branch", - description: "The source branch that will be used to create the new branch", + description: "The source branch that will be used to create the new branch. Defaults to the repository's default branch (usually `main` or `master`)", propDefinition: [ github, "branch", diff --git a/components/github/actions/create-gist/create-gist.mjs b/components/github/actions/create-gist/create-gist.mjs index 0a180f3141589..8bd85c019a05f 100644 --- a/components/github/actions/create-gist/create-gist.mjs +++ b/components/github/actions/create-gist/create-gist.mjs @@ -4,8 +4,8 @@ import utils from "../../actions/common/utils.mjs"; export default { key: "github-create-gist", name: "Create Gist", - description: "Allows you to add a new gist with one or more files. [See docs here](https://docs.github.com/en/rest/gists/gists?apiVersion=2022-11-28#create-a-gist)", - version: "0.0.6", + 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.7", type: "action", props: { github, diff --git a/components/github/actions/create-issue-comment/create-issue-comment.mjs b/components/github/actions/create-issue-comment/create-issue-comment.mjs index ead0c44dc6e11..a455eac68b53d 100644 --- a/components/github/actions/create-issue-comment/create-issue-comment.mjs +++ b/components/github/actions/create-issue-comment/create-issue-comment.mjs @@ -3,8 +3,8 @@ import github from "../../github.app.mjs"; export default { key: "github-create-issue-comment", name: "Create Issue Comment", - description: "Create a new comment in a issue. [See docs here](https://docs.github.com/en/rest/issues/comments#create-an-issue-comment)", - version: "0.0.17", + 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.18", type: "action", props: { github, diff --git a/components/github/actions/create-issue/create-issue.mjs b/components/github/actions/create-issue/create-issue.mjs index 5937af316972d..c146d827b3d22 100644 --- a/components/github/actions/create-issue/create-issue.mjs +++ b/components/github/actions/create-issue/create-issue.mjs @@ -1,10 +1,12 @@ +import { checkPushPermission } from "../../common/utils.mjs"; import github from "../../github.app.mjs"; +import asyncProps from "../common/asyncProps.mjs"; export default { key: "github-create-issue", name: "Create Issue", - description: "Create a new issue in a Gihub repo. [See docs here](https://docs.github.com/en/rest/issues/issues#create-an-issue)", - version: "0.2.16", + description: "Create a new issue in a Gihub repo. [See the documentation](https://docs.github.com/en/rest/issues/issues#create-an-issue)", + version: "0.3.0", type: "action", props: { github, @@ -13,6 +15,7 @@ export default { github, "repoFullname", ], + reloadProps: true, }, title: { label: "Title", @@ -21,47 +24,41 @@ export default { }, body: { label: "Body", - description: "The contents of the issue", + description: "The text body of the issue", type: "string", optional: true, }, - labels: { - label: "Labels", - description: "Labels to associate with this issue. NOTE: Only users with push access can set labels for new issues", - optional: true, - propDefinition: [ - github, - "labels", - (c) => ({ - repoFullname: c.repoFullname, - }), - ], - }, - assignees: { - label: "Assignees", - description: "Logins for Users to assign to this issue. NOTE: Only users with push access can set assignees for new issues", - optional: true, - propDefinition: [ - github, - "collaborators", - (c) => ({ - repoFullname: c.repoFullname, - }), - ], - }, + }, + methods: { + checkPushPermission, + }, + async additionalProps() { + const canPush = await this.checkPushPermission(); + return canPush + ? { + assignees: asyncProps.assignees, + labels: asyncProps.labels, + milestoneNumber: asyncProps.milestoneNumber, + } + : { + infoBox: { + type: "alert", + alertType: "info", + content: "Labels, assignees and milestones can only be set by users with push access to the repository.", + }, + }; }, async run({ $ }) { - const response = await this.github.createIssue({ - repoFullname: this.repoFullname, - data: { - title: this.title, - body: this.body, - labels: this.labels, - assignees: this.assignees, - }, + const { // eslint-disable-next-line no-unused-vars + github, repoFullname, infoBox, ...data + } = this; + + const response = await github.createIssue({ + repoFullname, + data, }); - $.export("$summary", "Successfully created issue."); + $.export("$summary", `Successfully created issue (ID: ${response.id})`); return response; }, diff --git a/components/github/actions/create-or-update-file-contents/create-or-update-file-contents.mjs b/components/github/actions/create-or-update-file-contents/create-or-update-file-contents.mjs index 284c51753280d..61e8a08b5768f 100644 --- a/components/github/actions/create-or-update-file-contents/create-or-update-file-contents.mjs +++ b/components/github/actions/create-or-update-file-contents/create-or-update-file-contents.mjs @@ -2,9 +2,9 @@ import github from "../../github.app.mjs"; export default { key: "github-create-or-update-file-contents", - name: "Create or update file contents", - description: "Create or update a file in a repository. This will replace an existing file. [See docs here](https://docs.github.com/en/rest/repos/contents#create-or-update-file-contents)", - version: "0.0.13", + 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.0", type: "action", props: { github, @@ -32,21 +32,25 @@ export default { default: "Pipedream - {{steps.trigger.context.workflow_name}} ({{steps.trigger.context.workflow_id}})", }, branch: { - label: "Branch", + propDefinition: [ + github, + "branch", + (c) => ({ + repoFullname: c.repoFullname, + }), + ], description: - "The branch name. Defaults to the repository’s default branch (usually `master`)", - type: "string", + "The branch to use. Defaults to the repository's default branch (usually `main` or `master`)", optional: true, }, }, async run({ $ }) { - - const response = await this.github.createOrUpdateFileContent({ - repoFullname: this.repoFullname, - path: this.path, - commitMessage: this.commitMessage, - fileContent: this.fileContent, - branch: this.branch, + const { + github, branch, ...data + } = this; + const response = await github.createOrUpdateFileContent({ + ...data, + branch: branch && branch.split("/")[1], }); $.export("$summary", `Successfully set contents of ${this.path}${this.branch diff --git a/components/github/actions/create-pull-request/create-pull-request.mjs b/components/github/actions/create-pull-request/create-pull-request.mjs index 79f54d7ee28d8..c6f9881e2fe0b 100644 --- a/components/github/actions/create-pull-request/create-pull-request.mjs +++ b/components/github/actions/create-pull-request/create-pull-request.mjs @@ -1,15 +1,11 @@ import { ConfigurationError } from "@pipedream/platform"; -import { toSingleLineString } from "../../common/utils.mjs"; import github from "../../github.app.mjs"; export default { key: "github-create-pull-request", name: "Create Pull Request", - description: toSingleLineString(` - Creates a new pull request for a specified repository. - [See docs here](https://docs.github.com/en/rest/pulls/pulls#create-a-pull-request) - `), - version: "0.0.9", + 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.0", type: "action", props: { github, @@ -18,20 +14,8 @@ export default { github, "repoFullname", ], - }, - head: { - propDefinition: [ - github, - "branch", - (c) => ({ - repoFullname: c.repoFullname, - }), - ], - label: "Head Branch", - description: toSingleLineString(` - The name of the branch where your changes are implemented. - For cross-repository pull requests in the same network, \`namespace\` head with a user like this: \`username:branch\`. - `), + label: "Base Repository", + description: "The base repository, where the pull request will be created.", }, base: { propDefinition: [ @@ -42,58 +26,48 @@ export default { }), ], label: "Base Branch", - description: toSingleLineString(` - The name of the branch you want the changes pulled into. - This should be an existing branch on the current repository. - You cannot submit a pull request to one repository that requests a merge to a base of another repository. - `), + description: "The base branch, where the changes will be received.", }, - org: { + headRepo: { propDefinition: [ github, - "orgName", + "repoFullname", ], - optional: true, + label: "Head Repository", + description: "The head repository, where the changes originate from. This can, but does not have to, be the same repository.", }, - headRepo: { + head: { propDefinition: [ github, - "repoOrg", + "branch", (c) => ({ - org: c.org, + repoFullname: c.headRepo, }), ], - label: "Head Repository's Name", - description: toSingleLineString(` - The name of the repository where the changes in the pull request were made. - This field is required for cross-repository pull requests if both repositories are owned by the same organization. - `), - optional: true, + label: "Head Branch", + description: "The head branch, where the changes originate from", }, body: { label: "Body", - description: "The contents of the pull request.", + description: "The text description of the pull request.", type: "string", optional: true, }, maintainerCanModify: { - label: "Maintainer Can Modify", + 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, }, draft: { label: "Is Draft", - description: toSingleLineString(` - Indicates whether the pull request is a draft. - See "[Draft Pull Requests](https://docs.github.com/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. - `), + description: "Indicates whether the pull request is a draft. See \"[Draft Pull Requests](https://docs.github.com/articles/about-pull-requests#draft-pull-requests)\" in the GitHub Help documentation to learn more.", type: "boolean", optional: true, }, title: { label: "Title", - description: "The title of the new pull request.", + description: "The title of the pull request.", type: "string", optional: true, }, @@ -106,10 +80,7 @@ export default { }), ], label: "Issue", - description: toSingleLineString(` - An issue in the repository to convert to a pull request. - The issue title, body, and comments will become the title, body, and comments on the new pull request. - `), + description: "An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request.", min: 1, optional: true, }, @@ -117,10 +88,7 @@ export default { async run({ $ }) { if (!this.issue && !this.title) { - throw new ConfigurationError(toSingleLineString(` - Title is required if Issue is unspecified. - You can either specify a new pull request with Title or convert an existing issue to a pull request with Issue. - `)); + throw new ConfigurationError("Title is required if Issue is unspecified. You can either specify a new pull request with Title or convert an existing issue to a pull request with Issue."); } if (this.issue && this.title) { diff --git a/components/github/actions/create-repository/create-repository.mjs b/components/github/actions/create-repository/create-repository.mjs index 622a9451a0b1f..2bad7e7a73f84 100644 --- a/components/github/actions/create-repository/create-repository.mjs +++ b/components/github/actions/create-repository/create-repository.mjs @@ -3,8 +3,8 @@ import github from "../../github.app.mjs"; export default { key: "github-create-repository", name: "Create Repository", - description: "Creates a new repository for the authenticated user. [See docs here](https://docs.github.com/en/rest/repos/repos#create-a-repository-for-the-authenticated-user)", - version: "0.0.12", + 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.13", type: "action", props: { github, diff --git a/components/github/actions/get-issue-assignees/get-issue-assignees.mjs b/components/github/actions/get-issue-assignees/get-issue-assignees.mjs index b89734118a8c5..ba325f4cd8a61 100644 --- a/components/github/actions/get-issue-assignees/get-issue-assignees.mjs +++ b/components/github/actions/get-issue-assignees/get-issue-assignees.mjs @@ -3,8 +3,8 @@ import github from "../../github.app.mjs"; export default { key: "github-get-issue-assignees", name: "Get Issue Assignees", - description: "Get assignees for an issue in a Gihub repo. [See docs here](https://docs.github.com/en/rest/issues/issues#get-an-issue)", - version: "0.0.17", + description: "Get assignees for an issue in a Gihub repo. [See the documentation](https://docs.github.com/en/rest/issues/issues#get-an-issue)", + version: "0.0.18", type: "action", props: { github, diff --git a/components/github/actions/get-repository-content/get-repository-content.mjs b/components/github/actions/get-repository-content/get-repository-content.mjs index b63c55b6dcba2..71306516d49b1 100644 --- a/components/github/actions/get-repository-content/get-repository-content.mjs +++ b/components/github/actions/get-repository-content/get-repository-content.mjs @@ -1,14 +1,10 @@ -import { toSingleLineString } from "../../common/utils.mjs"; import github from "../../github.app.mjs"; export default { key: "github-get-repository-content", name: "Get Repository Content", - description: toSingleLineString(` - Get the content of a file or directory in a specific repository. - [See docs here](https://docs.github.com/en/rest/repos/contents#get-repository-content) - `), - version: "0.0.16", + 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.0", type: "action", props: { github, @@ -20,25 +16,41 @@ export default { }, path: { label: "Path", - description: toSingleLineString(` - The file path or directory to retrieve. - When left unspecified, this action will retrieve the contents of the - repository's root directory. - `), + description: "The file path or directory to retrieve. Defaults to the repository's root directory.", type: "string", default: "", optional: true, }, mediaType: { label: "Media Type", - description: toSingleLineString(` - [Custom media types](https://docs.github.com/en/rest/overview/media-types) are used in the API to let consumers choose the format of the data they wish to receive. - This is done by adding one or more of the following types to the Accept header when you make a request. - Media types are specific to resources, allowing them to change independently and support - formats that other resources don't. - `), + description: "The media type of the response. [See the documentation](https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#get-repository-content) for more information.", type: "string", - default: "", + options: [ + { + value: "application/vnd.github.raw+json", + label: "Returns the raw file contents for files and symlinks", + }, + { + value: "application/vnd.github.html+json", + label: "Returns the file contents in HTML", + }, + { + value: "application/vnd.github.object+json", + label: "Returns the contents in a consistent object format regardless of the content type", + }, + ], + optional: true, + }, + branch: { + propDefinition: [ + github, + "branch", + (c) => ({ + repoFullname: c.repoFullname, + }), + ], + description: + "The branch to use. Defaults to the repository's default branch (usually `main` or `master`)", optional: true, }, }, @@ -47,6 +59,9 @@ export default { repoFullname: this.repoFullname, path: this.path, mediaType: this.mediaType, + params: { + ref: this.branch?.split?.("/")[0], + }, }); $.export("$summary", "Successfully retrieved repository content."); diff --git a/components/github/actions/get-repository/get-repository.mjs b/components/github/actions/get-repository/get-repository.mjs index 7b6e65cd78fa2..faab708a2c64b 100644 --- a/components/github/actions/get-repository/get-repository.mjs +++ b/components/github/actions/get-repository/get-repository.mjs @@ -2,9 +2,9 @@ import github from "../../github.app.mjs"; export default { key: "github-get-repository", - name: "Get Repository", - description: "Get specific repository. [See docs here](https://docs.github.com/en/rest/repos/repos#get-a-repository)", - version: "0.0.17", + 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.18", type: "action", props: { github, @@ -16,11 +16,12 @@ export default { }, }, async run({ $ }) { + const { repoFullname } = this; const response = await this.github.getRepo({ - repoFullname: this.repoFullname, + repoFullname, }); - $.export("$summary", "Successfully retrieved repository."); + $.export("$summary", `Successfully retrieved repository ${repoFullname}`); return response; }, diff --git a/components/github/actions/get-reviewers/get-reviewers.mjs b/components/github/actions/get-reviewers/get-reviewers.mjs index b1780acf772d3..237fa7fe4652b 100644 --- a/components/github/actions/get-reviewers/get-reviewers.mjs +++ b/components/github/actions/get-reviewers/get-reviewers.mjs @@ -1,12 +1,12 @@ import github from "../../github.app.mjs"; +import asyncProps from "../common/asyncProps.mjs"; import constants from "../common/constants.mjs"; -import { ConfigurationError } from "@pipedream/platform"; export default { key: "github-get-reviewers", name: "Get Reviewers", - description: "Get reviewers for a PR ([see docs](https://docs.github.com/en/rest/pulls/reviews#list-reviews-for-a-pull-request)) or Commit SHA ([see docs](https://docs.github.com/en/rest/commits/commits#list-pull-requests-associated-with-a-commit)).", - version: "0.0.17", + 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.0", type: "action", props: { github, @@ -16,30 +16,37 @@ export default { "repoFullname", ], }, - pullNumber: { - propDefinition: [ - github, - "pullNumber", - (c) => ({ - repoFullname: c.repoFullname, - }), - ], - optional: true, - }, - commitSha: { + prOrCommit: { type: "string", - label: "Commit SHA", - description: "A commit SHA. This field will have precendence over **PR Number**", - optional: true, + label: "PR or Commit", + description: "Whether to get reviewers for a [pull request](https://docs.github.com/en/rest/pulls/reviews#list-reviews-for-a-pull-request) or a [commit SHA](https://docs.github.com/en/rest/commits/commits#list-pull-requests-associated-with-a-commit).", + options: [ + "Pull Request", + "Commit SHA", + ], + reloadProps: true, }, reviewStates: { type: "string[]", label: "Review States", - description: "Filter by these review states. Default includes `APPROVED` and `CHANGES_REQUESTED` only", + description: "Filter by these review states", options: constants.PULL_REQUEST_STATES, optional: true, }, }, + async additionalProps() { + return this.prOrCommit === "Pull Request" + ? { + pullNumber: asyncProps.pullNumber, + } + : { + commitSha: { + type: "string", + label: "Commit SHA", + description: "A commit SHA to get reviewers for", + }, + }; + }, methods: { getReviewers(reviews) { const reviewers = reviews @@ -47,10 +54,7 @@ export default { if (this.reviewStates?.length) { return this.reviewStates.includes(review.state); // user-defined states } - return [ - "APPROVED", - "CHANGES_REQUESTED", - ].includes(review.state); // default states + return true; // default states: all }) .map((review) => review.user.login); return this.uniqueReviewers(reviewers); @@ -62,10 +66,6 @@ export default { }, }, async run({ $ }) { - if (!(this.pullNumber || this.commitSha)) { - throw new ConfigurationError("Please provide a **PR Number** or a **Commit SHA**"); - } - let pullNumber = this.pullNumber; if (this.commitSha) { @@ -89,7 +89,7 @@ export default { const reviewers = this.getReviewers(reviews); - $.export("$summary", "Successfully retrieved reviewers."); + $.export("$summary", "Successfully retrieved reviewers"); return reviewers; }, diff --git a/components/github/actions/list-gists-for-a-user/list-gists-for-a-user.mjs b/components/github/actions/list-gists-for-a-user/list-gists-for-a-user.mjs index beef31888d9f1..1fb82712793b2 100644 --- a/components/github/actions/list-gists-for-a-user/list-gists-for-a-user.mjs +++ b/components/github/actions/list-gists-for-a-user/list-gists-for-a-user.mjs @@ -1,34 +1,51 @@ +import { ConfigurationError } from "@pipedream/platform"; import github from "../../github.app.mjs"; export default { key: "github-list-gists-for-a-user", name: "List Gists for a User", - description: "Lists public gists for the specified user. [See docs here](https://docs.github.com/en/rest/gists/gists?apiVersion=2022-11-28#list-gists-for-a-user)", - version: "0.0.6", + 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.0", type: "action", props: { - github, - username: { - label: "Username", - description: "The username of the user whose gists you want to list", - type: "string", + github: { + ...github, + reloadProps: true, }, since: { - label: "Since", - description: "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.", + label: "Filter by Timestamp", + description: "Only show notifications updated since the given time. This should be a timestamp in ISO 8601 format, e.g. `2018-05-16T09:30:10Z` or [another standard date/time format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format).", type: "string", optional: true, }, }, + async additionalProps() { + const { login } = await this.github.getAuthenticatedUser(); + return { + username: { + label: "Username", + description: "The username of the user whose gists you want to list", + type: "string", + default: login, + }, + }; + }, async run({ $ }) { const PER_PAGE = 100; const MAX_PAGES = 50; let page = 1; const data = []; + const date = this.since && new Date(this.since); + if (date && isNaN(date.valueOf())) { + throw new ConfigurationError("Invalid date string provided"); + } + + const since = date?.toISOString(); + while (true) { const res = await this.github.listGistsFromUser(this.username, { - since: this.since, + since, per_page: PER_PAGE, page, }); @@ -45,11 +62,11 @@ export default { } if (data.length === 0) { - $.export("$summary", `No gists found for user "${this.username}".`); + $.export("$summary", `No gists found for user "${this.username}"`); return; } - $.export("$summary", `Successfully fetched ${data.length} gist(s).`); + $.export("$summary", `Successfully fetched ${data.length} gist(s)`); return data; }, }; diff --git a/components/github/actions/list-releases/list-releases.mjs b/components/github/actions/list-releases/list-releases.mjs index 4a2d41db7b766..b69c42e9c2bba 100644 --- a/components/github/actions/list-releases/list-releases.mjs +++ b/components/github/actions/list-releases/list-releases.mjs @@ -1,12 +1,10 @@ -// Import necessary modules import github from "../../github.app.mjs"; -// Define the action 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.5", + version: "0.0.6", type: "action", props: { github, diff --git a/components/github/actions/search-issues-and-pull-requests/search-issues-and-pull-requests.mjs b/components/github/actions/search-issues-and-pull-requests/search-issues-and-pull-requests.mjs index 58eb3d0c7e205..8c1a77308d0e8 100644 --- a/components/github/actions/search-issues-and-pull-requests/search-issues-and-pull-requests.mjs +++ b/components/github/actions/search-issues-and-pull-requests/search-issues-and-pull-requests.mjs @@ -3,27 +3,36 @@ import github from "../../github.app.mjs"; export default { key: "github-search-issues-and-pull-requests", name: "Search Issues and Pull Requests", - description: "Find issues and pull requests by state and keyword. [See docs here](https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests)", - version: "0.1.16", + 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.0", type: "action", props: { github, + infoBox: { + type: "alert", + alertType: "info", + content: `Example query: \`bug report in:title type:issue repo:octocat/Hello-World\` + +This will return issues in the repository [octocat/Hello-World](https://github.com/octocat/Hello-World) with the title including the words "bug report".`, + }, query: { label: "Query", - description: "The query contains one or more search keywords and qualifiers", + description: "The query contains one or more search keywords and qualifiers. [See the documentation](https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests) for more information and examples", type: "string", }, maxResults: { label: "Maximum Results", - description: "The maximum of resources that will be returned", + description: "The maximum amount of items to retrieve", type: "integer", default: 100, }, }, - async run() { - return this.github.searchIssueAndPullRequests({ + async run({ $ }) { + const response = await this.github.searchIssueAndPullRequests({ query: this.query, maxResults: this.maxResults, }); + $.export("$summary", `Successfully fetched ${response.length} items`); + return response; }, }; diff --git a/components/github/actions/update-gist/update-gist.mjs b/components/github/actions/update-gist/update-gist.mjs index e7491a0d6a4e5..fd2d8b19ac57b 100644 --- a/components/github/actions/update-gist/update-gist.mjs +++ b/components/github/actions/update-gist/update-gist.mjs @@ -5,11 +5,16 @@ import { ConfigurationError } from "@pipedream/platform"; export default { key: "github-update-gist", name: "Update Gist", - description: "Allows you to update a gist's description and to update, delete, or rename gist files. 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. [See docs here](https://docs.github.com/en/rest/gists/gists?apiVersion=2022-11-28#update-a-gist)", - version: "0.0.6", + 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.7", type: "action", props: { github, + infoAlert: { + 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.", + }, gistId: { propDefinition: [ github, diff --git a/components/github/actions/update-issue/update-issue.mjs b/components/github/actions/update-issue/update-issue.mjs index d9062ed8b6850..6b8111959b750 100644 --- a/components/github/actions/update-issue/update-issue.mjs +++ b/components/github/actions/update-issue/update-issue.mjs @@ -1,19 +1,20 @@ -import github from "../../github.app.mjs"; +import createIssue from "../create-issue/create-issue.mjs"; + +const { + props: { + github, repoFullname, ...props + }, additionalProps, methods, +} = createIssue; export default { key: "github-update-issue", name: "Update Issue", - description: "Update a new issue in a Gihub repo. [See docs here](https://docs.github.com/en/rest/issues/issues#update-an-issue)", - version: "0.1.16", + description: "Update a new issue in a Gihub repo. [See the documentation](https://docs.github.com/en/rest/issues/issues#update-an-issue)", + version: "0.2.0", type: "action", props: { github, - repoFullname: { - propDefinition: [ - github, - "repoFullname", - ], - }, + repoFullname, issueNumber: { label: "Issue Number", description: "The number that identifies the issue.", @@ -26,55 +27,21 @@ export default { }), ], }, - title: { - label: "Title", - description: "The title of the issue", - type: "string", - }, - body: { - label: "Body", - description: "The contents of the issue", - type: "string", - optional: true, - }, - labels: { - label: "Labels", - description: "Labels to associate with this issue. NOTE: Only users with push access can set labels for new issues", - optional: true, - propDefinition: [ - github, - "labels", - (c) => ({ - repoFullname: c.repoFullname, - }), - ], - }, - assignees: { - label: "Assignees", - description: "Logins for Users to assign to this issue. NOTE: Only users with push access can set assignees for new issues", - optional: true, - propDefinition: [ - github, - "collaborators", - (c) => ({ - repoFullname: c.repoFullname, - }), - ], - }, + ...props, }, + additionalProps, + methods, async run({ $ }) { + const { // eslint-disable-next-line no-unused-vars + github, repoFullname, issueNumber, infoBox, ...data + } = this; const response = await this.github.updateIssue({ - repoFullname: this.repoFullname, - issueNumber: this.issueNumber, - data: { - title: this.title, - body: this.body, - labels: this.labels, - assignees: this.assignees, - }, + repoFullname, + issueNumber, + data, }); - $.export("$summary", "Successfully created issue."); + $.export("$summary", `Successfully updated issue #${issueNumber}`); return response; }, diff --git a/components/github/actions/update-project-v2-item-status/update-project-v2-item-status.mjs b/components/github/actions/update-project-v2-item-status/update-project-v2-item-status.mjs index e94374bfbcd5f..7aff1349e2116 100644 --- a/components/github/actions/update-project-v2-item-status/update-project-v2-item-status.mjs +++ b/components/github/actions/update-project-v2-item-status/update-project-v2-item-status.mjs @@ -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.1", + version: "0.0.2", type: "action", props: { github, diff --git a/components/github/common/utils.mjs b/components/github/common/utils.mjs index e011fd87c8355..aa4395d22455a 100644 --- a/components/github/common/utils.mjs +++ b/components/github/common/utils.mjs @@ -1,22 +1,24 @@ -/** - * A utility function that accepts a string as an argument and reformats it in - * order to remove newline characters and consecutive spaces. Useful when - * dealing with very long templated strings that are split into multiple lines. - * - * @example - * // returns "This is a much cleaner string" - * toSingleLineString(` - * This is a much - * cleaner string - * `); - * - * @param {string} multiLineString the input string to reformat - * @returns a formatted string based on the content of the input argument, - * without newlines and multiple spaces - */ -export function toSingleLineString(multiLineString) { - return multiLineString - .trim() - .replace(/\n/g, " ") - .replace(/\s{2,}/g, " "); +async function getUserRepoPermissions(github, repoFullname) { + const { login: username } = await github.getAuthenticatedUser(); + const { user: { permissions } } = await github.getUserRepoPermissions({ + repoFullname, + username, + }); + return permissions; +} + +export async function checkAdminPermission() { + const { + github, repoFullname, + } = this; + const { admin } = await getUserRepoPermissions(github, repoFullname); + return admin; +} + +export async function checkPushPermission() { + const { + github, repoFullname, + } = this; + const { push } = await getUserRepoPermissions(github, repoFullname); + return push; } diff --git a/components/github/github.app.mjs b/components/github/github.app.mjs index f13db7dccc78f..3c57520b261a3 100644 --- a/components/github/github.app.mjs +++ b/components/github/github.app.mjs @@ -162,12 +162,15 @@ export default { label: "Issue Number", description: "The issue number", type: "integer", - async options({ repoFullname }) { + async options({ + repoFullname, page = 0, + }) { const issues = await this.getRepositoryIssues({ + page: page + 1, repoFullname, }); - return issues.map((issue) => ({ + return issues?.filter?.((issue) => !issue.pull_request).map((issue) => ({ label: issue.title, value: +issue.number, })); @@ -195,8 +198,11 @@ export default { type: "integer", label: "PR Number", description: "A pull request number", - async options({ repoFullname }) { + async options({ + repoFullname, page = 0, + }) { const prs = await this.getRepositoryPullRequests({ + page: page + 1, repoFullname, }); @@ -206,6 +212,21 @@ export default { })); }, }, + milestoneNumber: { + type: "integer", + label: "Milestone Number", + description: "The number of a milestone to associate this issue with.", + async options({ repoFullname }) { + const items = await this.getRepositoryMilestones({ + repoFullname, + }); + + return items.map((item) => ({ + label: item.title, + value: +item.number, + })); + }, + }, column: { label: "Column", description: "The column in a project board", @@ -336,6 +357,7 @@ export default { repoFullname, path, mediaType, + ...args }) { return this._makeRequest({ path: `/repos/${repoFullname}/contents/${path}`, @@ -344,6 +366,7 @@ export default { Accept: mediaType, }, }), + ...args, }); }, async getRepositoryLabels({ repoFullname }) { @@ -352,10 +375,14 @@ export default { async getRepositoryCollaborators({ repoFullname }) { return this._client().paginate(`GET /repos/${repoFullname}/collaborators`, {}); }, - async getRepositoryIssues({ repoFullname }) { - return this._client().paginate(`GET /repos/${repoFullname}/issues`, { + async getRepositoryIssues({ + repoFullname, ...args + }) { + const results = await this._client().request(`GET /repos/${repoFullname}/issues`, { state: "all", + ...args, }); + return results.data; }, async getRepositoryProjects({ repoFullname }) { return this._client().paginate(`GET /repos/${repoFullname}/projects`, {}); @@ -549,8 +576,11 @@ export default { return issues; }, - async getRepositoryPullRequests({ repoFullname }) { - return this._client().paginate(`GET /repos/${repoFullname}/pulls`, {}); + async getRepositoryPullRequests({ + repoFullname, ...args + }) { + const response = await this._client().request(`GET /repos/${repoFullname}/pulls`, args ?? {}); + return response.data; }, async getPullRequestForCommit({ repoFullname, sha, @@ -604,6 +634,11 @@ export default { const fileExists = await this._makeRequest({ path: `/repos/${repoFullname}/contents/${path}`, validateStatus: () => true, + ...(branch && { + params: { + ref: branch, + }, + }), }); if (fileExists.sha) { console.log("File exists, overwriting."); diff --git a/components/github/package.json b/components/github/package.json index 6992cf708f0af..5329710a21a41 100644 --- a/components/github/package.json +++ b/components/github/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/github", - "version": "1.4.1", + "version": "1.5.0", "description": "Pipedream Github Components", "main": "github.app.mjs", "keywords": [ diff --git a/components/github/sources/common/common-flex.mjs b/components/github/sources/common/common-flex.mjs index df4dfe5095440..4320a8b197c88 100644 --- a/components/github/sources/common/common-flex.mjs +++ b/components/github/sources/common/common-flex.mjs @@ -1,8 +1,7 @@ import github from "../../github.app.mjs"; import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; -import { - checkAdminPermission, getRelevantHeaders, -} from "./utils.mjs"; +import { getRelevantHeaders } from "./utils.mjs"; +import { checkAdminPermission } from "../../common/utils.mjs"; export default { props: { diff --git a/components/github/sources/common/common-webhook.mjs b/components/github/sources/common/common-webhook.mjs index 897b54703d95f..fa022146905bb 100644 --- a/components/github/sources/common/common-webhook.mjs +++ b/components/github/sources/common/common-webhook.mjs @@ -1,6 +1,6 @@ import { ConfigurationError } from "@pipedream/platform"; import github from "../../github.app.mjs"; -import { checkAdminPermission } from "./utils.mjs"; +import { checkAdminPermission } from "../../common/utils.mjs"; export default { props: { diff --git a/components/github/sources/common/utils.mjs b/components/github/sources/common/utils.mjs index 46becffea085b..e5a0f8eafd2b3 100644 --- a/components/github/sources/common/utils.mjs +++ b/components/github/sources/common/utils.mjs @@ -1,13 +1,3 @@ -export async function checkAdminPermission() { - const { repoFullname } = this; - const { login: username } = await this.github.getAuthenticatedUser(); - const { user: { permissions: { admin } } } = await this.github.getUserRepoPermissions({ - repoFullname, - username, - }); - return admin; -} - export async function checkOrgAdminPermission() { const { org } = this; const { login: username } = await this.github.getAuthenticatedUser(); diff --git a/components/github/sources/new-branch/new-branch.mjs b/components/github/sources/new-branch/new-branch.mjs index fdad80a70144b..710fe1a04655d 100644 --- a/components/github/sources/new-branch/new-branch.mjs +++ b/components/github/sources/new-branch/new-branch.mjs @@ -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.6", + version: "1.0.7", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-card-in-column/new-card-in-column.mjs b/components/github/sources/new-card-in-column/new-card-in-column.mjs index 305b2eeed721b..7ce3b01a02093 100644 --- a/components/github/sources/new-card-in-column/new-card-in-column.mjs +++ b/components/github/sources/new-card-in-column/new-card-in-column.mjs @@ -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.5", + version: "1.0.6", type: "source", props: { ...common.props, diff --git a/components/github/sources/new-collaborator/new-collaborator.mjs b/components/github/sources/new-collaborator/new-collaborator.mjs index c31ea5bce2e73..f422ef844af92 100644 --- a/components/github/sources/new-collaborator/new-collaborator.mjs +++ b/components/github/sources/new-collaborator/new-collaborator.mjs @@ -8,7 +8,7 @@ export default { key: "github-new-collaborator", name: "New Collaborator", description: "Emit new event when a collaborator is added", - version: "1.0.6", + version: "1.0.7", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-commit-comment/new-commit-comment.mjs b/components/github/sources/new-commit-comment/new-commit-comment.mjs index 8b4b271edfb7e..1af43146322f2 100644 --- a/components/github/sources/new-commit-comment/new-commit-comment.mjs +++ b/components/github/sources/new-commit-comment/new-commit-comment.mjs @@ -8,7 +8,7 @@ export default { key: "github-new-commit-comment", name: "New Commit Comment", description: "Emit new event when a commit comment is created", - version: "1.0.6", + version: "1.0.7", type: "source", dedupe: "unique", props: { diff --git a/components/github/sources/new-commit/new-commit.mjs b/components/github/sources/new-commit/new-commit.mjs index a003402ec0eb5..4eb7f57a47b79 100644 --- a/components/github/sources/new-commit/new-commit.mjs +++ b/components/github/sources/new-commit/new-commit.mjs @@ -8,7 +8,7 @@ export default { key: "github-new-commit", name: "New Commit", description: "Emit new event when commits are pushed to a branch", - version: "1.0.7", + version: "1.0.8", type: "source", dedupe: "unique", props: { diff --git a/components/github/sources/new-discussion/new-discussion.mjs b/components/github/sources/new-discussion/new-discussion.mjs index 0b15ce1079ab5..b0ad87cc0efbb 100644 --- a/components/github/sources/new-discussion/new-discussion.mjs +++ b/components/github/sources/new-discussion/new-discussion.mjs @@ -8,7 +8,7 @@ export default { key: "github-new-discussion", name: "New Discussion", description: "Emit new event when a discussion is created", - version: "1.0.6", + version: "1.0.7", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-fork/new-fork.mjs b/components/github/sources/new-fork/new-fork.mjs index 14eeafbe944d1..4f96eba6ab4ee 100644 --- a/components/github/sources/new-fork/new-fork.mjs +++ b/components/github/sources/new-fork/new-fork.mjs @@ -8,7 +8,7 @@ export default { key: "github-new-fork", name: "New Fork", description: "Emit new event when a repository is forked", - version: "1.0.6", + version: "1.0.7", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-gist/new-gist.mjs b/components/github/sources/new-gist/new-gist.mjs index 5d580c57640b8..197c35625ed2c 100644 --- a/components/github/sources/new-gist/new-gist.mjs +++ b/components/github/sources/new-gist/new-gist.mjs @@ -5,7 +5,7 @@ export default { key: "github-new-gist", name: "New Gist", 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=2022-11-28#list-gists-for-the-authenticated-user)", - version: "0.2.0", + version: "0.2.1", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-issue-with-status/new-issue-with-status.mjs b/components/github/sources/new-issue-with-status/new-issue-with-status.mjs index 00cfa24c97625..f8c2a7adf3979 100644 --- a/components/github/sources/new-issue-with-status/new-issue-with-status.mjs +++ b/components/github/sources/new-issue-with-status/new-issue-with-status.mjs @@ -8,7 +8,7 @@ export default { key: "github-new-issue-with-status", name: "Project Item Status Changed", description: "Emit new event when a project item is tagged with a specific status. Currently supports Organization Projects only. [More information here](https://docs.github.com/en/issues/planning-and-tracking-with-projects/managing-items-in-your-project/adding-items-to-your-project)", - version: "0.1.3", + version: "0.1.4", type: "source", dedupe: "unique", props: { diff --git a/components/github/sources/new-label/new-label.mjs b/components/github/sources/new-label/new-label.mjs index d8ffeb7a2942a..ab8142386b786 100644 --- a/components/github/sources/new-label/new-label.mjs +++ b/components/github/sources/new-label/new-label.mjs @@ -8,7 +8,7 @@ export default { key: "github-new-label", name: "New Label", description: "Emit new event when a new label is created", - version: "1.0.6", + version: "1.0.7", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-mention/new-mention.mjs b/components/github/sources/new-mention/new-mention.mjs index 40c2e3939bc29..98c5457c54c6f 100644 --- a/components/github/sources/new-mention/new-mention.mjs +++ b/components/github/sources/new-mention/new-mention.mjs @@ -5,7 +5,7 @@ export default { key: "github-new-mention", name: "New Mention", description: "Emit new event when you are @mentioned in a new commit, comment, issue or pull request. [See the documentation](https://docs.github.com/en/rest/activity/notifications?apiVersion=2022-11-28#list-notifications-for-the-authenticated-user)", - version: "0.2.0", + version: "0.2.1", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-notification/new-notification.mjs b/components/github/sources/new-notification/new-notification.mjs index c5c3b579c52a7..1411bea450e59 100644 --- a/components/github/sources/new-notification/new-notification.mjs +++ b/components/github/sources/new-notification/new-notification.mjs @@ -5,7 +5,7 @@ export default { key: "github-new-notification", name: "New Notification", 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)", - version: "0.2.0", + version: "0.2.1", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-or-updated-issue/new-or-updated-issue.mjs b/components/github/sources/new-or-updated-issue/new-or-updated-issue.mjs index d084b18d3e99a..f9c78a910e5ad 100644 --- a/components/github/sources/new-or-updated-issue/new-or-updated-issue.mjs +++ b/components/github/sources/new-or-updated-issue/new-or-updated-issue.mjs @@ -9,7 +9,7 @@ export default { key: "github-new-or-updated-issue", name: "New or Updated Issue", description: "Emit new events when an issue is created or updated", - version: "1.1.3", + version: "1.1.4", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-or-updated-milestone/new-or-updated-milestone.mjs b/components/github/sources/new-or-updated-milestone/new-or-updated-milestone.mjs index 550cc2446e5bd..f21a9c8070776 100644 --- a/components/github/sources/new-or-updated-milestone/new-or-updated-milestone.mjs +++ b/components/github/sources/new-or-updated-milestone/new-or-updated-milestone.mjs @@ -9,7 +9,7 @@ export default { key: "github-new-or-updated-milestone", name: "New or Updated Milestone", description: "Emit new event when a milestone is created or updated", - version: "1.1.3", + version: "1.1.4", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-or-updated-pull-request/new-or-updated-pull-request.mjs b/components/github/sources/new-or-updated-pull-request/new-or-updated-pull-request.mjs index f928875ae0d12..af692b0bba51c 100644 --- a/components/github/sources/new-or-updated-pull-request/new-or-updated-pull-request.mjs +++ b/components/github/sources/new-or-updated-pull-request/new-or-updated-pull-request.mjs @@ -9,7 +9,7 @@ export default { key: "github-new-or-updated-pull-request", name: "New or Updated Pull Request", description: "Emit new event when a pull request is opened or updated", - version: "1.2.3", + version: "1.2.4", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-organization/new-organization.mjs b/components/github/sources/new-organization/new-organization.mjs index d1a79328906e8..c10cad683bf13 100644 --- a/components/github/sources/new-organization/new-organization.mjs +++ b/components/github/sources/new-organization/new-organization.mjs @@ -5,7 +5,7 @@ export default { key: "github-new-organization", name: "New Organization", description: "Emit new event when the authenticated user is added to a new organization. [See the documentation](https://docs.github.com/en/rest/orgs/orgs?apiVersion=2022-11-28#list-organizations-for-the-authenticated-user)", - version: "0.2.0", + version: "0.2.1", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-release/new-release.mjs b/components/github/sources/new-release/new-release.mjs index d670ca3b3dce7..7d8696ebc10eb 100644 --- a/components/github/sources/new-release/new-release.mjs +++ b/components/github/sources/new-release/new-release.mjs @@ -8,7 +8,7 @@ export default { key: "github-new-release", name: "New release", description: "Emit new event when a new release is created", - version: "1.0.6", + version: "1.0.7", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-repository/new-repository.mjs b/components/github/sources/new-repository/new-repository.mjs index 70b01cf45089e..00a86fe9cd66e 100644 --- a/components/github/sources/new-repository/new-repository.mjs +++ b/components/github/sources/new-repository/new-repository.mjs @@ -5,7 +5,7 @@ export default { key: "github-new-repository", name: "New Repository", description: "Emit new event when a new repository is created or when the authenticated user receives access. [See the documentation](https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#list-repositories-for-the-authenticated-user)", - version: "0.2.0", + version: "0.2.1", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-review-request/new-review-request.mjs b/components/github/sources/new-review-request/new-review-request.mjs index e725cd6dc1555..a4ae8cbf4b331 100644 --- a/components/github/sources/new-review-request/new-review-request.mjs +++ b/components/github/sources/new-review-request/new-review-request.mjs @@ -5,7 +5,7 @@ export default { key: "github-new-review-request", name: "New Review Request", 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)", - version: "0.2.0", + version: "0.2.1", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-security-alert/new-security-alert.mjs b/components/github/sources/new-security-alert/new-security-alert.mjs index e793c93378525..c56265ac1d30d 100644 --- a/components/github/sources/new-security-alert/new-security-alert.mjs +++ b/components/github/sources/new-security-alert/new-security-alert.mjs @@ -5,7 +5,7 @@ export default { key: "github-new-security-alert", name: "New Security Alert", description: "Emit new event for security alert notifications. [See the documentation](https://docs.github.com/en/rest/activity/notifications?apiVersion=2022-11-28#list-notifications-for-the-authenticated-user)", - version: "0.2.0", + version: "0.2.1", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-star-by-user/new-star-by-user.mjs b/components/github/sources/new-star-by-user/new-star-by-user.mjs index 50fdf353d6ceb..775bb75b13c91 100644 --- a/components/github/sources/new-star-by-user/new-star-by-user.mjs +++ b/components/github/sources/new-star-by-user/new-star-by-user.mjs @@ -5,7 +5,7 @@ export default { key: "github-new-star-by-user", name: "New Star By User", description: "Emit new events when the specified user stars a repository. [See the documentation](https://docs.github.com/en/rest/activity/starring?apiVersion=2022-11-28#list-repositories-starred-by-a-user)", - version: "0.0.5", + version: "0.0.6", type: "source", dedupe: "unique", props: { diff --git a/components/github/sources/new-star/new-star.mjs b/components/github/sources/new-star/new-star.mjs index 37c7f6bc5e013..636ec54a42b14 100644 --- a/components/github/sources/new-star/new-star.mjs +++ b/components/github/sources/new-star/new-star.mjs @@ -8,7 +8,7 @@ export default { key: "github-new-star", name: "New Stars", description: "Emit new event when a repository is starred", - version: "1.0.6", + version: "1.0.7", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/new-team/new-team.mjs b/components/github/sources/new-team/new-team.mjs index 5c36526a123fb..82b153e2f308e 100644 --- a/components/github/sources/new-team/new-team.mjs +++ b/components/github/sources/new-team/new-team.mjs @@ -5,7 +5,7 @@ export default { key: "github-new-team", name: "New Team", description: "Emit new event when the authenticated user is added to a new team. [See the documentation](https://docs.github.com/en/rest/teams/teams?apiVersion=2022-11-28#list-teams-for-the-authenticated-user)", - version: "0.2.0", + version: "0.2.1", type: "source", dedupe: "unique", methods: { diff --git a/components/github/sources/webhook-events/webhook-events.mjs b/components/github/sources/webhook-events/webhook-events.mjs index fc6787ef705c0..9dd49e0f51160 100644 --- a/components/github/sources/webhook-events/webhook-events.mjs +++ b/components/github/sources/webhook-events/webhook-events.mjs @@ -8,7 +8,7 @@ export default { name: "New Webhook Event (Instant)", description: "Emit new event for each selected event type", type: "source", - version: "1.0.6", + version: "1.0.7", dedupe: "unique", props: { docsInfo: { diff --git a/components/l2s/l2s.app.mjs b/components/l2s/l2s.app.mjs index ae1e0a9de75a6..b38e7dced004f 100644 --- a/components/l2s/l2s.app.mjs +++ b/components/l2s/l2s.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/langbase/langbase.app.mjs b/components/langbase/langbase.app.mjs index 5e189fd9650c1..4a66c23d22182 100644 --- a/components/langbase/langbase.app.mjs +++ b/components/langbase/langbase.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/pixelbin/pixelbin.app.mjs b/components/pixelbin/pixelbin.app.mjs index 72f04ce547342..11a79187b9bdc 100644 --- a/components/pixelbin/pixelbin.app.mjs +++ b/components/pixelbin/pixelbin.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/smslink_nc/smslink_nc.app.mjs b/components/smslink_nc/smslink_nc.app.mjs index 223964611ff08..65131a164d1d7 100644 --- a/components/smslink_nc/smslink_nc.app.mjs +++ b/components/smslink_nc/smslink_nc.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/tricentis_qtest/tricentis_qtest.app.mjs b/components/tricentis_qtest/tricentis_qtest.app.mjs index 079f611ecf8f2..e8b10fb7a1289 100644 --- a/components/tricentis_qtest/tricentis_qtest.app.mjs +++ b/components/tricentis_qtest/tricentis_qtest.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/vida/vida.app.mjs b/components/vida/vida.app.mjs index bf020a6ed6451..965a2403b4154 100644 --- a/components/vida/vida.app.mjs +++ b/components/vida/vida.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +};