Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.
/ gitevents-tito Public archive

A Gitevents plugin for adding / updating events in Tito.

License

Notifications You must be signed in to change notification settings

gitevents/gitevents-tito

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitevents-tito

A gitevents plugin for adding / updating events in Tito.

Installation

npm i gitevents-tito --save

Prerequisites

  • You will need a Tito account to use this plugin.
  • Access to V2 of the Tito API

Usage

You will first need to instantiate an instance of the plugin making sure to pass in your Tito API access credentials:

var giteventsTito = require('gitevents-tito');

var tito = giteventsTito({
 authToken: <YOUR_AUTH_TOKEN>
 account: <YOUR_ACCOUNT_NAME>
});

Once you have an instance of the plugin you can call the following methods:

  • createEvent - Create a new event in Tito
  • UpdateEvent - Update an existing event in Tito
  • duplicateEvent - Duplicate an existing event in Tito
  • getLatestEvent - Get the latest event posted in Tito

Creating a new event

A new event can be created from a Github webhook payload.

tito.createNewEvent(githubPayload, function (err, event) {
  // ...
});

Updating an existing event

An existing event can be updated from a Github webhook payload.

tito.updateEvent(existingEventJSON, githubPayload, function (err, event) {
  // ...
});

Duplicating an existing event

An existing event can be duplicated.

tito.updateEvent(existingEventJSON, function (err, event) {
  // ...
});

Getting the latest event

The latest event added can be retrieved.

tito.getLatestEvent(function (err, event) {
  //...
});

About

A Gitevents plugin for adding / updating events in Tito.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published