← Schedule + Gitlab integrations

Create Branch with Gitlab API on Custom Interval from Schedule API

Pipedream makes it easy to connect APIs for Gitlab, Schedule and 1000+ other apps remarkably fast.

Trigger workflow on
Custom Interval from the Schedule API
Next, do this
Create Branch with the Gitlab API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

This integration creates a workflow with a Schedule trigger and Gitlab action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the Custom Interval trigger
    1. Connect your Schedule account
    2. Configure Cron Schedule
  3. Configure the Create Branch action
    1. Connect your Gitlab account
    2. Select a Project ID
    3. Select a Branch Ref
    4. Configure Branch Name
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, open source components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Trigger your workflow every N hours, minutes or seconds.
Version:0.0.2
Key:schedule-custom-interval

Trigger Code

import schedule from "../../schedule.app.mjs";

export default {
  name: "Custom Interval",
  version: "0.0.2",
  key: "schedule-custom-interval",
  type: "source",
  description: "Trigger your workflow every N hours, minutes or seconds.",
  props: {
    schedule,
    cron: {
      propDefinition: [
        schedule,
        "cron",
      ],
    },
  },
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
SchedulescheduleappThis component uses the Schedule app.
Cron Schedulecron$.interface.timer

Enter a cron expression

Trigger Authentication

The Schedule API does not require authentication.

About Schedule

Trigger workflows on an interval or cron schedule.

Action

Description:Create a new branch in the repository. [See docs](https://docs.gitlab.com/ee/api/branches.html#create-repository-branch)
Version:0.3.0
Key:gitlab-create-branch

Action Code

import gitlab from "../../gitlab.app.mjs";

export default {
  key: "gitlab-create-branch",
  name: "Create Branch",
  description: "Create a new branch in the repository. [See docs](https://docs.gitlab.com/ee/api/branches.html#create-repository-branch)",
  version: "0.3.0",
  type: "action",
  props: {
    gitlab,
    projectId: {
      propDefinition: [
        gitlab,
        "projectId",
      ],
    },
    ref: {
      propDefinition: [
        gitlab,
        "branch",
        (c) => ({
          projectId: c.projectId,
        }),
      ],
      label: "Branch Ref",
      description: "The branch name or commit SHA to create branch from",
    },
    branchName: {
      type: "string",
      label: "Branch Name",
      description: "The name of the branch to create",
    },
  },
  async run({ $ }) {
    const response = await this.gitlab.createBranch(this.projectId, this.branchName, this.ref);
    $.export("$summary", `Created branch ${this.branchName}`);
    return response;
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
GitlabgitlabappThis component uses the Gitlab app.
Project IDprojectIdintegerSelect a value from the drop down menu.
Branch RefrefstringSelect a value from the drop down menu.
Branch NamebranchNamestring

The name of the branch to create

Action Authentication

Gitlab uses OAuth authentication. When you connect your Gitlab account, Pipedream will open a popup window where you can sign into Gitlab and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Gitlab API.

Pipedream requests the following authorization scopes when you connect your account:

apiread_userread_repositorywrite_repositoryread_registrysudoopenidprofileemail

About Gitlab

Project planning and source code management

More Ways to Connect Gitlab + Schedule

Create issue with Gitlab API on Schedule based on a custom interval from Schedule API
Schedule + Gitlab
 
Try it
Edit Issue with Gitlab API on Schedule based on a custom interval from Schedule API
Schedule + Gitlab
 
Try it
Get Issue with Gitlab API on Schedule based on a custom interval from Schedule API
Schedule + Gitlab
 
Try it
Get Repo Branch with Gitlab API on Schedule based on a custom interval from Schedule API
Schedule + Gitlab
 
Try it
List Repo Branches with Gitlab API on Schedule based on a custom interval from Schedule API
Schedule + Gitlab
 
Try it
Custom Interval from the Schedule API

Trigger your workflow every N hours, minutes or seconds.

 
Try it
Daily schedule from the Schedule API

Trigger your workflow every day.

 
Try it
Monthly Schedule from the Schedule API

Trigger your workflow on one or more days each month at a specific time (with timezone support).

 
Try it
Weekly schedule from the Schedule API

Trigger your workflow on one or more days each week at a specific time (with timezone support).

 
Try it
New Commit (Instant) from the Gitlab API

Emit new event when a new commit is pushed to a branch

 
Try it
Create Branch with the Gitlab API

Create a new branch in the repository. See docs

 
Try it
Create Epic with the Gitlab API

Creates a new epic. See docs

 
Try it
Create issue with the Gitlab API

Creates a new issue. See docs

 
Try it
Edit Issue with the Gitlab API

Updates an existing project issue. See docs

 
Try it
Get Issue with the Gitlab API

Gets a single issue from repository. See docs

 
Try it