@pipedream/github
v1.6.0
Published
Pipedream Github Components
Downloads
156
Readme
Overview
The GitHub API is a powerful gateway to interaction with GitHub's vast web of data and services, offering a suite of endpoints to manipulate and retrieve information on repositories, pull requests, issues, and more. Harnessing this API on Pipedream, you can orchestrate automated workflows that respond to events in real-time, manage repository data, streamline collaborative processes, and connect GitHub with other services for a more integrated development lifecycle.
Github API Integration Platform
Connect Github to 2,200+ apps, remarkably fast.
Pipedream is an integration platform for developers. Pipedream provides a free, hosted platform for connecting apps and developing event-driven automations.
Demo
Click the image below to watch a brief demo on YouTube.
Key Features
Workflows - Workflows run automations. Workflows are sequence of steps - pre-built actions or custom Node.js, Python, Golang, or Bash code - triggered by an event (HTTP request, timer, new row added to a Google Sheet, and more).
Event Sources - Sources trigger workflows. They emit events from services like GitHub, Slack, Airtable, RSS and more. When you want to run a workflow when an event happens in any third-party app, you're using an event source.
Actions - Actions are pre-built code steps that you can use in a workflow to perform common operations across Pipedream's 2000+ API integrations. For example, you can use actions to send email, add a row to a Google Sheet, and more.
Custom code - Most integrations require custom logic. Code is often the best way to express that logic, so Pipedream allows you to run any Node.js, Python, Golang, or Bash code. You can import any package from the languages' package managers, connect to any Pipedream connected app, and more. Pipedream is "low-code" in the best way: you can use pre-built components when you're performing common actions, but you can write custom code when you need to.
Destinations - Deliver events asynchronously to common destinations like Amazon S3, Snowflake, HTTP and email
Workflows
Workflows are a sequence of linear steps triggered by an event (like an HTTP request, or when a new row is added to a Google sheet). You can quickly develop complex automations using workflows and connect to any of our 500+ integrated apps.
See our workflow quickstart to get started.
Github API Event Sources (explore)
Event Sources watch for new data from services like GitHub, Slack, Airtable, RSS and more. When a source finds a new event, it emits it, triggering any linked workflows.
- New Branch - Triggers an event when a branch is created. (code)
- New Card in Column (Classic Projects) - Triggers an event when a (classic) project card is created or moved to a specific column. For Projects V2 use New Issue with Status trigger. (code)
- New Collaborator - Triggers an event when a collaborator is added. (code)
- New Commit - Triggers an event when commits are pushed to a branch. (code)
- New Commit Comment - Triggers an event when a commit comment is created. (code)
- New Discussion - Triggers an event when a discussion is created. (code)
- New Fork - Triggers an event when a repository is forked. (code)
- New Gist - Triggers an event when new gists are created by the authenticated user. (code)
- New Issue with Status (Projects V2) - Triggers an event when a project issue is tagged with a specific status. Currently supports Organization Projects only. (code)
- New Label - Triggers an event when a new label is created. (code)
- New Mention - Triggers an event when you are @mentioned in a new commit, comment, issue, or pull request. (code)
- New Notification - Triggers an event when you receive a new notification. (code)
- New or Updated Issue - Triggers an event when an issue is created or updated. (code)
- New or Updated Milestone - Triggers an event when a milestone is created or updated. (code)
- New or Updated Pull Request - Triggers an event when a pull request is opened or updated. (code)
- New Organization - Triggers an event when the authenticated user is added to a new organization. (code)
- New Release - Triggers an event when a new release is created. (code)
- New Repository - Triggers an event when new repositories are created. (code)
- New Review Request - Triggers an event when you or a team you're a member of are requested to review a pull request. (code)
- New Security Alert - Triggers an event when GitHub discovers a security vulnerability in one of your repositories. (code)
- New Star By User - Triggers an event when the specified user stars a repository. (code)
- New Star - Triggers an event when a repository is starred. (code)
- New Team - Triggers an event when the user is added to a new team. (code)
- New Webhook Event (Instant) - Triggers an event for each selected event type. (code)
You can also consume events emitted by sources using Pipedream's REST API or a private, real-time SSE stream.
When a pre-built source doesn't exist for your use case, you can build your own. Here is the simplest event source: it exposes an HTTP endpoint you can send any request to, and prints the contents of the request when invoked:
export default {
name: "http",
version: "0.0.1",
props: {
http: "$.interface.http",
},
run(event) {
console.log(event); // event contains the method, payload, etc.
},
};
You can find the code for all pre-built sources in the components
directory. If you find a bug or want to contribute a feature, see our contribution guide.
Github API Actions (explore)
Actions are pre-built code steps that you can use in a workflow to perform common operations across Pipedream's 2,000+ API integrations. For example, you can use actions to send email, add a row to a Google Sheet, and more.
- Create Issue - Create a new issue in a Gihub repo. (code)
- Search Issues and Pull Requests - Find issues and pull requests by state and keyword. (code)
- Create Branch - Create a new branch in a Github repo. (code)
- Create Gist - Allows you to add a new gist with one or more files. (code)
- Create Issue Comment - Create a new comment in a issue. (code)
- Create or update file contents - Create or update a file in a repository. This will replace an existing file. (code)
- Create Pull Request - Creates a new pull request for a specified repository. (code)
- Create Repository - Creates a new repository for the authenticated user. (code)
- Get Issue Assignees - Get assignees for an issue in a Github repo. (code)
- Get Repository - Get specific repository. (code)
- Get Repository Content - Get the content of a file or directory in a specific repository. (code)
- Get Reviewers - Get reviewers for a PR. (code)
- List Gists for a User - Lists public gists for the specified user. (code)
- List Releases - List releases for a repository. (code)
- Update Gist - 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. (code)
- Update Issue - Update a new issue in a Github repo. (code)
You can create your own actions, which you can re-use across workflows. You can also publish actions to the entire Pipedream community, making them available for anyone to use.
Here's an action that accepts a name
as input and prints it to the workflow's logs:
export default {
name: "Action Demo",
description: "This is a demo action",
key: "action_demo",
version: "0.0.1",
type: "action",
props: {
name: {
type: "string",
label: "Name",
}
},
async run() {
return `hello ${this.name}!`
},
}
You can find the code for all pre-built actions in the components
directory. If you find a bug or want to contribute a feature, see our contribution guide.
Other Popular API Integrations
- Airtable (explore)
- AWS (explore)
- Dropbox (explore)
- Google Sheets (explore)
- Google Drive (explore)
- RSS (explore)
- Twitter (explore)
Custom code
Most integrations require custom logic. Code is often the best way to express that logic, so Pipedream allows you to run custom code in a workflow using:
You can import any package from the languages' package managers by declaring the imports directly in code. Pipedream will parse and download the necessary dependencies.
// Node.js
import axios from 'axios'
# Python
import pandas as pd
// Go
import (
"fmt"
pd "github.com/PipedreamHQ/pipedream-go"
)
You can also connect to any Pipedream connected app in custom code steps. For example, you can connect your Slack account and send a message to a channel:
import { WebClient } from '@slack/web-api'
export default defineComponent({
props: {
// This creates a connection called "slack" that connects a Slack account.
slack: {
type: 'app',
app: 'slack'
}
},
async run({ steps, $ }) {
const web = new WebClient(this.slack.$auth.oauth_access_token)
return await web.chat.postMessage({
text: "Hello, world!",
channel: "#general",
})
}
});
Destinations
Destinations, like actions, abstract the connection, batching, and delivery logic required to send events to services like Amazon S3, or targets like HTTP and email.
For example, sending data to an Amazon S3 bucket is as simple as calling $send.s3()
:
$send.s3({
bucket: "your-bucket-here",
prefix: "your-prefix/",
payload: event.body,
});
Pipedream supports the following destinations:
Contributors
Thank you to everyone who has contributed to the Pipedream codebase. We appreciate you!
Pricing
Pipedream has a generous free tier. You can run sources and workflows for free within the limits of the free tier. If you hit these limits, you can upgrade to one of our paid tiers.
Limits
The Pipedream platform imposes some runtime limits on sources and workflows. Read more about those in our docs.
Found a Bug? Have a Feature to suggest?
Before adding an issue, please search the existing issues or reach out to our team to see if a similar request already exists.
If an issue exists, please add a reaction or add a comment detailing your specific use case.
If an issue doesn't yet exist and you need to create one, please use the issue templates.
Security
You can read about our platform security and privacy here.
If you'd like to report a suspected vulnerability or security issue, or have any questions about the security of the product, please contact our security team at [email protected].
Troubleshooting
Note: Event Source New Card in Column only supports legacy (classic) projects.
Please reach out to the Pipedream team with any technical issues or questions about the Github integration. We're happy to help!
Getting Started
Github Triggers: Webhooks vs. Polling
The Github triggers in Pipedream enable you to get notified immediately via a webhook if you have admin
rights on the repo you're watching. Otherwise you can still poll for updates at a regular interval for any other repo where you might not have admin
rights.
Example: New or Updated Issue If you are an admin on the repo, this trigger will be configured as a webhook — so any time there is a new or updated issue in the repo, an event will immediately get emitted.
If you do not have admin
rights on the repo you're watching, you can configure the Pipedream trigger to poll for updates on a regular interval.
Example Use Cases
Automated Issue Management Workflow: Trigger a workflow on Pipedream when new GitHub issues are opened. Automatically label them based on content, assign to the correct team member, or prioritize by sending details to a project management tool like Trello or Jira.
Code Quality Control Workflow: Upon each push to a repository, use Pipedream to run the code through automated tests and linters, reporting back the status directly in the commit or pull request. Integrate with Slack to notify the development team about the code quality status or any failed checks.
Release Management Workflow: Automate the process of releasing new versions of software. When a new tag is pushed to GitHub, Pipedream can build the code, run tests, deploy the release to production environments, and notify stakeholders through email or a messaging app like Microsoft Teams.