mirror of
https://code.forgejo.org/actions/git-backporting.git
synced 2025-05-17 02:59:13 -04:00
feat: integrate tool with gitlab service (#39)
* feat: integrate tool with gitlab service Fix https://github.com/lampajr/backporting/issues/30
This commit is contained in:
parent
8a007941d1
commit
107f5e52d6
35 changed files with 17821 additions and 1553 deletions
35
src/service/git/git-client.ts
Normal file
35
src/service/git/git-client.ts
Normal file
|
@ -0,0 +1,35 @@
|
|||
import { BackportPullRequest, GitPullRequest } from "@bp/service/git/git.types";
|
||||
|
||||
/**
|
||||
* Git management service interface, which provides a common API for interacting
|
||||
* with several git management services like GitHub, Gitlab or Bitbucket.
|
||||
*/
|
||||
export default interface GitClient {
|
||||
|
||||
// READ
|
||||
|
||||
/**
|
||||
* Get a pull request object from the underneath git service
|
||||
* @param owner repository's owner
|
||||
* @param repo repository's name
|
||||
* @param prNumber pull request number
|
||||
* @returns {Promise<PullRequest>}
|
||||
*/
|
||||
getPullRequest(owner: string, repo: string, prNumber: number): Promise<GitPullRequest>;
|
||||
|
||||
/**
|
||||
* Get a pull request object from the underneath git service
|
||||
* @param prUrl pull request html url
|
||||
* @returns {Promise<PullRequest>}
|
||||
*/
|
||||
getPullRequestFromUrl(prUrl: string): Promise<GitPullRequest>;
|
||||
|
||||
// WRITE
|
||||
|
||||
/**
|
||||
* Create a new pull request on the underneath git service
|
||||
* @param backport backport pull request data
|
||||
* @returns {Promise<string>} the pull request url
|
||||
*/
|
||||
createPullRequest(backport: BackportPullRequest): Promise<string>;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue