/github-api

Java Connector for GitHub API

Primary LanguageJavaApache License 2.0Apache-2.0

Dipien

GitHub API

Java Connector for GitHub API

Setup

Add the following configuration to your build.gradle, replacing X.Y.Z by the latest version

    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("com.dipien:github-api-java:X.Y.Z")
    }

Usage

Create a Release

GitHubClient client = new GitHubClient();
client.setOAuth2Token("GITHUB_OATH_TOKEN");
IRepositoryIdProvider repositoryIdProvider = RepositoryId.create("REPOSITORY_OWNER", "REPOSITORY_NAME");

Release release = new Release();
release.setBody("RELEASE_NOTES");
release.setDraft(false);
release.setName("RELEASE_NAME");
release.setTagName("RELEASE_TAG_NAME");
release.setPrerelease(false);
release.setTargetCommitish("BRANCH_NAME");

ReleaseService releaseService = new ReleaseService(client);
releaseService.createRelease(repositoryIdProvider, release);

Sponsor this project

Sponsor this open source project to help us get the funding we need to continue working on it.

You can donate BTC (lightning), using this QR:

BTC

Follow us