Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.
Go to siteThe 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.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
github: {
type: "app",
app: "github",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.github.com/user`,
headers: {
Authorization: `Bearer ${this.github.$auth.oauth_access_token}`,
"X-GitHub-Api-Version": `2022-11-28`,
},
})
},
})
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.
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.
Find issues and pull requests by state and keyword. See the documentation
Allows you to add a new gist with one or more files. See the documentation
GitHub uses OAuth authentication. When you connect your GitHub account, Pipedream will open a popup window where you can sign into GitHub and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any GitHub API.
Pipedream requests the following authorization scopes when you connect your account:
repo
admin:org
admin:public_key
admin:org_hook
gist
project
notifications
user
write:discussion
write:packages
read:packages
admin:repo_hook
GET
https://github.com/login/oauth/authorize
?
client_id={{oauth.client_id}}
&
state={{oauth.state}}
&
redirect_uri={{oauth.redirect_uri}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
&
login=
POST
https://github.com/login/oauth/access_token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=authorization_code
&
code={{oauth.code}}