Tags

Github API
complete reference: https://developer.github.com/enterprise/2.4/v3/

============================
Possible Triggers
============================
Any new issue
-triggers everytime any new issue is opened in a repository you own/collaborate on.
opt_type=ISSUES

Any closed issue
-triggers everytime any issue is closed in a repo you own/collaborate on.

New issue assigned to you
-triggers everytime a new issue is assigned to you.

New repository by a specific username or organization
-triggers everytime a new repository is created by the username or organization you specify.

Any new gist
-triggers everytime new snippets is created/updated

Any published release event
-triggers when a release is published.

Any pull request event
-triggers when a pull request is assigned, unassigned, labeled, unlabeled, opened, closed, reopened, or synchronized.
opt_type=PULL_REQUEST

Any push event
-triggers everytime a repo branch is pushed to.
opt_type=PUSH

Starred a repository
-triggers everytime a user stars a repo.
opt_type=WATCH

============================
Possible Actions
============================
Issues
* Create/Read/Update an issue
Any user with pull access to a repository can create an issue.

Repositories
* Create/Read/Update/Delete a repository
Create a new repository for the authenticated user.

* Create/Read/Update/Delete a release
Users with push access to the repository can create a release.

* Create/Read/Update/Delete a commit comment
* Create/Read/Update/Delete a file
This method creates a new file in a repository

* Create a fork
Create a fork for the authenticated user.

Git Data
* Create a blob
Supported encoding: “utf-8” and “base64”. Default: “utf-8”.
* Create a commit
* Create a Tag Object

Gist
* Create/Read/Update/Delete a gist
* Star/Unstar a gist

Organization
* Create/Read/Update/Delete a team
In order to create a team, the authenticated user must be a member of :org

* Add/Remove team member
In order to add a user to a team, the authenticated user must have‘admin’ permissions to the team or be an owner of the organization that the team is associated with,
and the user being added must already be a member of atleast one other team on the same organization.

* Add/Remove team repository
In order to add a repository to a team, the authenticated user must be anowner of the org that the team is associated with.
Also, the repository mustbe owned by the organization, or a direct fork of a repository owned by theorganization.

Pull Request
* Create/Read/Update a pull request

CREATE monitoring
curl -X POST http://localhost:3010/api/monitor/ \
-H “Content-Type: application/json” \
-d ‘{ “recipeId” : “7af2ecfdee0909096564a36af31c55e9”, “token”: “0e98ec3cb08ba332a2ec9aaf16813ece46fe8fcf”, “repo”: “test”, “owner”: “ortegaaa”, “event”: “watch” }’

DELETE monitoring
curl -X DELETE http://localhost:3010/api/monitor/ \
-H “Content-Type: application/json” \
-d ‘{ “token”: “0e98ec3cb08ba332a2ec9aaf16813ece46fe8fcf”, “webhookUrl”: “https://github.com/api/v3/repos/ortegaaa/test/hooks/102205” }’

Advertisements