Github - Create Repo
@sergio
code:
data:privatelast updated:4 years ago
today
Build integrations remarkably fast!
You're viewing a public workflow template.
Sign up to customize, add steps, modify code and more.
Join 1,000,000+ developers using the Pipedream platform
steps.
trigger
HTTP API
Deploy to generate unique URL
This workflow runs on Pipedream's servers and is triggered by HTTP / Webhook requests.
steps.
github_create_repo
Creates a repository in an organization.
auth
(auths.github)
params
Name

The name of the repository.

 
string ·params.name
Org

Name of organisation.

 
string ·params.org
Optional
code
async (params, auths) => {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
}
29
//See the API docs here: https://developer.github.com/v3/repos/#create
const data = {
  auto_init: params.auto_init || false, 
  description: params.description, 
  gitignore_template: params.gitignore_template,   
  has_issues: params.has_issues || true, 
  has_wiki: params.has_wiki || true, 
  homepage: params.homepage, 
  name: params.name, 
  private: params.private, 
  team_id: params.team_id, 
  visibility: params.visibility, 
  has_projects: params.has_projects || true,
  is_template: params.is_template || false, 
  license_template: params.license_template, 
  allow_squash_merge: params.allow_squash_merge || true, 
  allow_merge_commit: params.allow_merge_commit || true, 
  allow_rebase_merge: params.allow_rebase_merge || true 
}
return await require("axios")({
  method: "post",
  url: `https://api.github.com/orgs/${params.org}/repos`,
  headers: {
    Authorization: `Bearer ${auths.github.oauth_access_token}`,
  },
  data,
});