@release-please-oss/release-please 0.0.0-stage → 17.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +279 -2
- package/build/src/bin/release-please.d.ts +22 -0
- package/build/src/bin/release-please.js +727 -0
- package/build/src/bootstrapper.d.ts +18 -0
- package/build/src/bootstrapper.js +64 -0
- package/build/src/changelog-notes/default.d.ts +15 -0
- package/build/src/changelog-notes/default.js +96 -0
- package/build/src/changelog-notes/github.d.ts +8 -0
- package/build/src/changelog-notes/github.js +29 -0
- package/build/src/changelog-notes.d.ts +22 -0
- package/build/src/changelog-notes.js +40 -0
- package/build/src/commit.d.ts +33 -0
- package/build/src/commit.js +422 -0
- package/build/src/errors/index.d.ts +36 -0
- package/build/src/errors/index.js +77 -0
- package/build/src/factories/changelog-notes-factory.d.ts +16 -0
- package/build/src/factories/changelog-notes-factory.js +44 -0
- package/build/src/factories/plugin-factory.d.ts +23 -0
- package/build/src/factories/plugin-factory.js +94 -0
- package/build/src/factories/versioning-strategy-factory.d.ts +16 -0
- package/build/src/factories/versioning-strategy-factory.js +52 -0
- package/build/src/factory.d.ts +18 -0
- package/build/src/factory.js +161 -0
- package/build/src/github-api.d.ts +260 -0
- package/build/src/github-api.js +714 -0
- package/build/src/github.d.ts +306 -0
- package/build/src/github.js +769 -0
- package/build/src/index.d.ts +17 -0
- package/build/src/index.js +41 -0
- package/build/src/local-github.d.ts +270 -0
- package/build/src/local-github.js +756 -0
- package/build/src/manifest.d.ts +370 -0
- package/build/src/manifest.js +1142 -0
- package/build/src/plugin.d.ts +37 -0
- package/build/src/plugin.js +57 -0
- package/build/src/plugins/cargo-workspace.d.ts +58 -0
- package/build/src/plugins/cargo-workspace.js +339 -0
- package/build/src/plugins/group-priority.d.ts +29 -0
- package/build/src/plugins/group-priority.js +82 -0
- package/build/src/plugins/linked-versions.d.ts +36 -0
- package/build/src/plugins/linked-versions.js +137 -0
- package/build/src/plugins/maven-workspace.d.ts +81 -0
- package/build/src/plugins/maven-workspace.js +431 -0
- package/build/src/plugins/merge.d.ts +27 -0
- package/build/src/plugins/merge.js +99 -0
- package/build/src/plugins/node-workspace.d.ts +50 -0
- package/build/src/plugins/node-workspace.js +352 -0
- package/build/src/plugins/sentence-case.d.ts +19 -0
- package/build/src/plugins/sentence-case.js +80 -0
- package/build/src/plugins/workspace.d.ts +173 -0
- package/build/src/plugins/workspace.js +308 -0
- package/build/src/pull-request.d.ts +11 -0
- package/build/src/pull-request.js +16 -0
- package/build/src/release-pull-request.d.ts +14 -0
- package/build/src/release-pull-request.js +16 -0
- package/build/src/release.d.ts +7 -0
- package/build/src/release.js +16 -0
- package/build/src/repository.d.ts +5 -0
- package/build/src/repository.js +16 -0
- package/build/src/scm.d.ts +80 -0
- package/build/src/scm.js +16 -0
- package/build/src/strategies/base.d.ts +162 -0
- package/build/src/strategies/base.js +494 -0
- package/build/src/strategies/bazel.d.ts +7 -0
- package/build/src/strategies/bazel.js +49 -0
- package/build/src/strategies/dart.d.ts +8 -0
- package/build/src/strategies/dart.js +73 -0
- package/build/src/strategies/dotnet-yoshi.d.ts +13 -0
- package/build/src/strategies/dotnet-yoshi.js +109 -0
- package/build/src/strategies/elixir.d.ts +5 -0
- package/build/src/strategies/elixir.js +46 -0
- package/build/src/strategies/expo.d.ts +15 -0
- package/build/src/strategies/expo.js +51 -0
- package/build/src/strategies/go-librarian.d.ts +11 -0
- package/build/src/strategies/go-librarian.js +84 -0
- package/build/src/strategies/go-yoshi.d.ts +14 -0
- package/build/src/strategies/go-yoshi.js +168 -0
- package/build/src/strategies/go.d.ts +7 -0
- package/build/src/strategies/go.js +53 -0
- package/build/src/strategies/helm.d.ts +8 -0
- package/build/src/strategies/helm.js +73 -0
- package/build/src/strategies/java-yoshi-mono-repo.d.ts +22 -0
- package/build/src/strategies/java-yoshi-mono-repo.js +308 -0
- package/build/src/strategies/java-yoshi.d.ts +20 -0
- package/build/src/strategies/java-yoshi.js +210 -0
- package/build/src/strategies/java.d.ts +28 -0
- package/build/src/strategies/java.js +176 -0
- package/build/src/strategies/krm-blueprint.d.ts +7 -0
- package/build/src/strategies/krm-blueprint.js +65 -0
- package/build/src/strategies/maven.d.ts +9 -0
- package/build/src/strategies/maven.js +56 -0
- package/build/src/strategies/node-librarian.d.ts +10 -0
- package/build/src/strategies/node-librarian.js +121 -0
- package/build/src/strategies/node.d.ts +10 -0
- package/build/src/strategies/node.js +111 -0
- package/build/src/strategies/ocaml.d.ts +5 -0
- package/build/src/strategies/ocaml.js +86 -0
- package/build/src/strategies/php-librarian.d.ts +6 -0
- package/build/src/strategies/php-librarian.js +35 -0
- package/build/src/strategies/php-yoshi.d.ts +13 -0
- package/build/src/strategies/php-yoshi.js +255 -0
- package/build/src/strategies/php.d.ts +6 -0
- package/build/src/strategies/php.js +76 -0
- package/build/src/strategies/python-librarian.d.ts +6 -0
- package/build/src/strategies/python-librarian.js +35 -0
- package/build/src/strategies/python.d.ts +11 -0
- package/build/src/strategies/python.js +175 -0
- package/build/src/strategies/r.d.ts +8 -0
- package/build/src/strategies/r.js +67 -0
- package/build/src/strategies/ruby-librarian.d.ts +6 -0
- package/build/src/strategies/ruby-librarian.js +35 -0
- package/build/src/strategies/ruby-yoshi.d.ts +13 -0
- package/build/src/strategies/ruby-yoshi.js +97 -0
- package/build/src/strategies/ruby.d.ts +9 -0
- package/build/src/strategies/ruby.js +71 -0
- package/build/src/strategies/rust.d.ts +17 -0
- package/build/src/strategies/rust.js +149 -0
- package/build/src/strategies/sfdx.d.ts +9 -0
- package/build/src/strategies/sfdx.js +67 -0
- package/build/src/strategies/simple.d.ts +7 -0
- package/build/src/strategies/simple.js +51 -0
- package/build/src/strategies/terraform-module.d.ts +7 -0
- package/build/src/strategies/terraform-module.js +90 -0
- package/build/src/strategy.d.ts +68 -0
- package/build/src/strategy.js +16 -0
- package/build/src/update.d.ts +24 -0
- package/build/src/update.js +16 -0
- package/build/src/updaters/base-xml.d.ts +19 -0
- package/build/src/updaters/base-xml.js +43 -0
- package/build/src/updaters/bazel/module-bazel.d.ts +7 -0
- package/build/src/updaters/bazel/module-bazel.js +33 -0
- package/build/src/updaters/changelog-json.d.ts +29 -0
- package/build/src/updaters/changelog-json.js +100 -0
- package/build/src/updaters/changelog.d.ts +13 -0
- package/build/src/updaters/changelog.js +55 -0
- package/build/src/updaters/composite.d.ts +20 -0
- package/build/src/updaters/composite.js +65 -0
- package/build/src/updaters/dart/pubspec-yaml.d.ts +13 -0
- package/build/src/updaters/dart/pubspec-yaml.js +50 -0
- package/build/src/updaters/default.d.ts +21 -0
- package/build/src/updaters/default.js +36 -0
- package/build/src/updaters/dotnet/apis.d.ts +18 -0
- package/build/src/updaters/dotnet/apis.js +45 -0
- package/build/src/updaters/dotnet/csproj.d.ts +12 -0
- package/build/src/updaters/dotnet/csproj.js +33 -0
- package/build/src/updaters/elixir/elixir-mix-exs.d.ts +13 -0
- package/build/src/updaters/elixir/elixir-mix-exs.js +42 -0
- package/build/src/updaters/expo/app-json.d.ts +31 -0
- package/build/src/updaters/expo/app-json.js +67 -0
- package/build/src/updaters/generic-json.d.ts +14 -0
- package/build/src/updaters/generic-json.js +54 -0
- package/build/src/updaters/generic-toml.d.ts +21 -0
- package/build/src/updaters/generic-toml.js +66 -0
- package/build/src/updaters/generic-xml.d.ts +8 -0
- package/build/src/updaters/generic-xml.js +38 -0
- package/build/src/updaters/generic-yaml.d.ts +23 -0
- package/build/src/updaters/generic-yaml.js +85 -0
- package/build/src/updaters/generic.d.ts +54 -0
- package/build/src/updaters/generic.js +187 -0
- package/build/src/updaters/go/version-go.d.ts +4 -0
- package/build/src/updaters/go/version-go.js +24 -0
- package/build/src/updaters/helm/chart-yaml.d.ts +13 -0
- package/build/src/updaters/helm/chart-yaml.js +41 -0
- package/build/src/updaters/java/java-released.d.ts +28 -0
- package/build/src/updaters/java/java-released.js +59 -0
- package/build/src/updaters/java/java-update.d.ts +21 -0
- package/build/src/updaters/java/java-update.js +80 -0
- package/build/src/updaters/java/pom-xml.d.ts +29 -0
- package/build/src/updaters/java/pom-xml.js +135 -0
- package/build/src/updaters/java/versions-manifest.d.ts +19 -0
- package/build/src/updaters/java/versions-manifest.js +71 -0
- package/build/src/updaters/krm/krm-blueprint-version.d.ts +13 -0
- package/build/src/updaters/krm/krm-blueprint-version.js +46 -0
- package/build/src/updaters/librarian-yaml.d.ts +45 -0
- package/build/src/updaters/librarian-yaml.js +149 -0
- package/build/src/updaters/node/package-json.d.ts +46 -0
- package/build/src/updaters/node/package-json.js +106 -0
- package/build/src/updaters/node/package-lock-json.d.ts +14 -0
- package/build/src/updaters/node/package-lock-json.js +83 -0
- package/build/src/updaters/node/samples-package-json.d.ts +24 -0
- package/build/src/updaters/node/samples-package-json.js +49 -0
- package/build/src/updaters/ocaml/dune-project.d.ts +13 -0
- package/build/src/updaters/ocaml/dune-project.js +37 -0
- package/build/src/updaters/ocaml/esy-json.d.ts +13 -0
- package/build/src/updaters/ocaml/esy-json.js +37 -0
- package/build/src/updaters/ocaml/opam.d.ts +13 -0
- package/build/src/updaters/ocaml/opam.js +37 -0
- package/build/src/updaters/php/php-client-version.d.ts +12 -0
- package/build/src/updaters/php/php-client-version.js +32 -0
- package/build/src/updaters/php/root-composer-update-packages.d.ts +13 -0
- package/build/src/updaters/php/root-composer-update-packages.js +60 -0
- package/build/src/updaters/python/pyproject-toml.d.ts +29 -0
- package/build/src/updaters/python/pyproject-toml.js +53 -0
- package/build/src/updaters/python/python-file-with-version.d.ts +12 -0
- package/build/src/updaters/python/python-file-with-version.js +32 -0
- package/build/src/updaters/python/setup-cfg.d.ts +12 -0
- package/build/src/updaters/python/setup-cfg.js +32 -0
- package/build/src/updaters/python/setup-py.d.ts +12 -0
- package/build/src/updaters/python/setup-py.js +32 -0
- package/build/src/updaters/r/description.d.ts +12 -0
- package/build/src/updaters/r/description.js +32 -0
- package/build/src/updaters/r/news.d.ts +12 -0
- package/build/src/updaters/r/news.js +49 -0
- package/build/src/updaters/raw-content.d.ts +19 -0
- package/build/src/updaters/raw-content.js +39 -0
- package/build/src/updaters/release-please-config.d.ts +8 -0
- package/build/src/updaters/release-please-config.js +80 -0
- package/build/src/updaters/release-please-manifest.d.ts +4 -0
- package/build/src/updaters/release-please-manifest.js +34 -0
- package/build/src/updaters/ruby/common.d.ts +17 -0
- package/build/src/updaters/ruby/common.js +46 -0
- package/build/src/updaters/ruby/gemfile-lock.d.ts +24 -0
- package/build/src/updaters/ruby/gemfile-lock.js +53 -0
- package/build/src/updaters/ruby/version-rb.d.ts +12 -0
- package/build/src/updaters/ruby/version-rb.js +34 -0
- package/build/src/updaters/rust/cargo-lock.d.ts +16 -0
- package/build/src/updaters/rust/cargo-lock.js +64 -0
- package/build/src/updaters/rust/cargo-toml.d.ts +13 -0
- package/build/src/updaters/rust/cargo-toml.js +89 -0
- package/build/src/updaters/rust/common.d.ts +54 -0
- package/build/src/updaters/rust/common.js +35 -0
- package/build/src/updaters/sfdx/sfdx-project-json.d.ts +21 -0
- package/build/src/updaters/sfdx/sfdx-project-json.js +41 -0
- package/build/src/updaters/terraform/metadata-version.d.ts +13 -0
- package/build/src/updaters/terraform/metadata-version.js +37 -0
- package/build/src/updaters/terraform/module-version.d.ts +13 -0
- package/build/src/updaters/terraform/module-version.js +37 -0
- package/build/src/updaters/terraform/readme.d.ts +12 -0
- package/build/src/updaters/terraform/readme.js +32 -0
- package/build/src/util/branch-name.d.ts +20 -0
- package/build/src/util/branch-name.js +225 -0
- package/build/src/util/code-suggester/default-options-handler.d.ts +10 -0
- package/build/src/util/code-suggester/default-options-handler.js +45 -0
- package/build/src/util/code-suggester/errors.d.ts +4 -0
- package/build/src/util/code-suggester/errors.js +24 -0
- package/build/src/util/code-suggester/github/branch.d.ts +45 -0
- package/build/src/util/code-suggester/github/branch.js +118 -0
- package/build/src/util/code-suggester/github/commit-and-push.d.ts +51 -0
- package/build/src/util/code-suggester/github/commit-and-push.js +141 -0
- package/build/src/util/code-suggester/github/create-commit.d.ts +20 -0
- package/build/src/util/code-suggester/github/create-commit.js +60 -0
- package/build/src/util/code-suggester/github/fork.d.ts +15 -0
- package/build/src/util/code-suggester/github/fork.js +48 -0
- package/build/src/util/code-suggester/github/labels.d.ts +14 -0
- package/build/src/util/code-suggester/github/labels.js +42 -0
- package/build/src/util/code-suggester/github/open-pull-request.d.ts +16 -0
- package/build/src/util/code-suggester/github/open-pull-request.js +56 -0
- package/build/src/util/code-suggester/index.d.ts +28 -0
- package/build/src/util/code-suggester/index.js +110 -0
- package/build/src/util/code-suggester/logger.d.ts +4 -0
- package/build/src/util/code-suggester/logger.js +37 -0
- package/build/src/util/code-suggester/types.d.ts +109 -0
- package/build/src/util/code-suggester/types.js +30 -0
- package/build/src/util/coerce-option.d.ts +1 -0
- package/build/src/util/coerce-option.js +40 -0
- package/build/src/util/commit-exclude.d.ts +10 -0
- package/build/src/util/commit-exclude.js +49 -0
- package/build/src/util/commit-split.d.ts +26 -0
- package/build/src/util/commit-split.js +100 -0
- package/build/src/util/commit-utils.d.ts +1 -0
- package/build/src/util/commit-utils.js +34 -0
- package/build/src/util/filter-commits.d.ts +12 -0
- package/build/src/util/filter-commits.js +59 -0
- package/build/src/util/indent-commit.d.ts +2 -0
- package/build/src/util/indent-commit.js +39 -0
- package/build/src/util/json-stringify.d.ts +1 -0
- package/build/src/util/json-stringify.js +22 -0
- package/build/src/util/logger.d.ts +24 -0
- package/build/src/util/logger.js +54 -0
- package/build/src/util/pull-request-body.d.ts +25 -0
- package/build/src/util/pull-request-body.js +147 -0
- package/build/src/util/pull-request-overflow-handler.d.ts +54 -0
- package/build/src/util/pull-request-overflow-handler.js +78 -0
- package/build/src/util/pull-request-title.d.ts +22 -0
- package/build/src/util/pull-request-title.js +146 -0
- package/build/src/util/signoff-commit-message.d.ts +1 -0
- package/build/src/util/signoff-commit-message.js +35 -0
- package/build/src/util/tag-name.d.ts +10 -0
- package/build/src/util/tag-name.js +42 -0
- package/build/src/util/toml-edit.d.ts +16 -0
- package/build/src/util/toml-edit.js +126 -0
- package/build/src/version.d.ts +35 -0
- package/build/src/version.js +74 -0
- package/build/src/versioning-strategies/always-bump-major.d.ts +10 -0
- package/build/src/versioning-strategies/always-bump-major.js +28 -0
- package/build/src/versioning-strategies/always-bump-minor.d.ts +10 -0
- package/build/src/versioning-strategies/always-bump-minor.js +28 -0
- package/build/src/versioning-strategies/always-bump-patch.d.ts +11 -0
- package/build/src/versioning-strategies/always-bump-patch.js +29 -0
- package/build/src/versioning-strategies/default.d.ts +48 -0
- package/build/src/versioning-strategies/default.js +102 -0
- package/build/src/versioning-strategies/dependency-manifest.d.ts +15 -0
- package/build/src/versioning-strategies/dependency-manifest.js +103 -0
- package/build/src/versioning-strategies/java-add-snapshot.d.ts +13 -0
- package/build/src/versioning-strategies/java-add-snapshot.js +54 -0
- package/build/src/versioning-strategies/java-snapshot.d.ts +13 -0
- package/build/src/versioning-strategies/java-snapshot.js +70 -0
- package/build/src/versioning-strategies/prerelease.d.ts +20 -0
- package/build/src/versioning-strategies/prerelease.js +163 -0
- package/build/src/versioning-strategies/service-pack.d.ts +12 -0
- package/build/src/versioning-strategies/service-pack.js +47 -0
- package/build/src/versioning-strategy.d.ts +90 -0
- package/build/src/versioning-strategy.js +82 -0
- package/package.json +114 -4
- package/schemas/config.json +513 -0
- package/schemas/manifest.json +9 -0
- package/templates/commit.hbs +2 -0
- package/templates/header.hbs +9 -0
- package/templates/template.hbs +19 -0
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import { PullRequest } from './pull-request';
|
|
2
|
+
import { Commit } from './commit';
|
|
3
|
+
import { Octokit } from '@octokit/rest';
|
|
4
|
+
import { request } from '@octokit/request';
|
|
5
|
+
type OctokitType = InstanceType<typeof Octokit>;
|
|
6
|
+
import { Repository } from './repository';
|
|
7
|
+
import { ReleasePullRequest } from './release-pull-request';
|
|
8
|
+
import { Update } from './update';
|
|
9
|
+
import { Release } from './release';
|
|
10
|
+
import { GitHubApi, GitHubCreateOptions } from './github-api';
|
|
11
|
+
import { GitHubFileContents } from '@google-automations/git-file-utils';
|
|
12
|
+
import { Logger } from './util/code-suggester/types';
|
|
13
|
+
import { Scm, ScmChangeSet, ScmCommitIteratorOptions, ScmReleaseIteratorOptions, ScmTagIteratorOptions, ScmCreatePullRequestOptions, ScmReleaseOptions, ScmRelease, ScmTag, ScmUpdatePullRequestOptions } from './scm';
|
|
14
|
+
type RequestBuilderType = typeof request;
|
|
15
|
+
type DefaultFunctionType = RequestBuilderType['defaults'];
|
|
16
|
+
type RequestFunctionType = ReturnType<DefaultFunctionType>;
|
|
17
|
+
export interface OctokitAPIs {
|
|
18
|
+
graphql: Function;
|
|
19
|
+
request: RequestFunctionType;
|
|
20
|
+
octokit: OctokitType;
|
|
21
|
+
}
|
|
22
|
+
export interface GitHubOptions {
|
|
23
|
+
repository: Repository;
|
|
24
|
+
octokitAPIs: OctokitAPIs;
|
|
25
|
+
logger?: Logger;
|
|
26
|
+
}
|
|
27
|
+
type CommitFilter = (commit: Commit) => boolean;
|
|
28
|
+
type CommitIteratorOptions = ScmCommitIteratorOptions;
|
|
29
|
+
type ReleaseIteratorOptions = ScmReleaseIteratorOptions;
|
|
30
|
+
type TagIteratorOptions = ScmTagIteratorOptions;
|
|
31
|
+
export type ReleaseOptions = ScmReleaseOptions;
|
|
32
|
+
export type GitHubRelease = ScmRelease;
|
|
33
|
+
export type GitHubTag = ScmTag;
|
|
34
|
+
export type ChangeSet = ScmChangeSet;
|
|
35
|
+
type CreatePullRequestOptions = ScmCreatePullRequestOptions;
|
|
36
|
+
export declare class GitHub implements Scm {
|
|
37
|
+
readonly repository: Repository;
|
|
38
|
+
private octokit;
|
|
39
|
+
private graphql;
|
|
40
|
+
private fileCache;
|
|
41
|
+
private logger;
|
|
42
|
+
private gitHubApi;
|
|
43
|
+
private constructor();
|
|
44
|
+
getGitHubApi(): GitHubApi;
|
|
45
|
+
static create(options: GitHubCreateOptions): Promise<GitHub>;
|
|
46
|
+
/**
|
|
47
|
+
* Returns the list of commits to the default branch after the provided filter
|
|
48
|
+
* query has been satified.
|
|
49
|
+
*
|
|
50
|
+
* @param {string} targetBranch Target branch of commit
|
|
51
|
+
* @param {CommitFilter} filter Callback function that returns whether a
|
|
52
|
+
* commit/pull request matches certain criteria
|
|
53
|
+
* @param {CommitIteratorOptions} options Query options
|
|
54
|
+
* @param {number} options.maxResults Limit the number of results searched.
|
|
55
|
+
* Defaults to unlimited.
|
|
56
|
+
* @param {boolean} options.backfillFiles If set, use the REST API for
|
|
57
|
+
* fetching the list of touched files in this commit. Defaults to `false`.
|
|
58
|
+
* @returns {Commit[]} List of commits to current branch
|
|
59
|
+
* @throws {GitHubAPIError} on an API error
|
|
60
|
+
*/
|
|
61
|
+
commitsSince(targetBranch: string, filter: CommitFilter, options?: CommitIteratorOptions): Promise<Commit[]>;
|
|
62
|
+
/**
|
|
63
|
+
* Iterate through commit history with a max number of results scanned.
|
|
64
|
+
*
|
|
65
|
+
* @param {string} targetBranch target branch of commit
|
|
66
|
+
* @param {CommitIteratorOptions} options Query options
|
|
67
|
+
* @param {number} options.maxResults Limit the number of results searched.
|
|
68
|
+
* Defaults to unlimited.
|
|
69
|
+
* @param {boolean} options.backfillFiles If set, use the REST API for
|
|
70
|
+
* fetching the list of touched files in this commit. Defaults to `false`.
|
|
71
|
+
* @yields {Commit}
|
|
72
|
+
* @throws {GitHubAPIError} on an API error
|
|
73
|
+
*/
|
|
74
|
+
mergeCommitIterator(targetBranch: string, options?: CommitIteratorOptions): AsyncGenerator<Commit, void, unknown>;
|
|
75
|
+
private mergeCommitsGraphQL;
|
|
76
|
+
/**
|
|
77
|
+
* Get the list of file paths modified in a given commit.
|
|
78
|
+
*
|
|
79
|
+
* @param {string} sha The commit SHA
|
|
80
|
+
* @returns {string[]} File paths
|
|
81
|
+
* @throws {GitHubAPIError} on an API error
|
|
82
|
+
*/
|
|
83
|
+
getCommitFiles: (sha: string) => Promise<string[]>;
|
|
84
|
+
private graphqlRequest;
|
|
85
|
+
/**
|
|
86
|
+
* Iterate through merged pull requests with a max number of results scanned.
|
|
87
|
+
*
|
|
88
|
+
* @param {string} targetBranch The base branch of the pull request
|
|
89
|
+
* @param {string} status The status of the pull request
|
|
90
|
+
* @param {number} maxResults Limit the number of results searched. Defaults to
|
|
91
|
+
* unlimited.
|
|
92
|
+
* @param {boolean} includeFiles Whether to fetch the list of files included in
|
|
93
|
+
* the pull request. Defaults to `true`.
|
|
94
|
+
* @yields {PullRequest}
|
|
95
|
+
* @throws {GitHubAPIError} on an API error
|
|
96
|
+
*/
|
|
97
|
+
pullRequestIterator(targetBranch: string, status?: 'OPEN' | 'CLOSED' | 'MERGED', maxResults?: number, includeFiles?: boolean): AsyncGenerator<PullRequest, void, void>;
|
|
98
|
+
/**
|
|
99
|
+
* Iterate through releases with a max number of results scanned.
|
|
100
|
+
*
|
|
101
|
+
* @param {ReleaseIteratorOptions} options Query options
|
|
102
|
+
* @param {number} options.maxResults Limit the number of results searched.
|
|
103
|
+
* Defaults to unlimited.
|
|
104
|
+
* @yields {GitHubRelease}
|
|
105
|
+
* @throws {GitHubAPIError} on an API error
|
|
106
|
+
*/
|
|
107
|
+
releaseIterator(options?: ReleaseIteratorOptions): AsyncGenerator<ScmRelease, void, unknown>;
|
|
108
|
+
/**
|
|
109
|
+
* Iterate through tags with a max number of results scanned.
|
|
110
|
+
*
|
|
111
|
+
* @param {TagIteratorOptions} options Query options
|
|
112
|
+
* @param {number} options.maxResults Limit the number of results searched.
|
|
113
|
+
* Defaults to unlimited.
|
|
114
|
+
* @yields {GitHubTag}
|
|
115
|
+
* @throws {GitHubAPIError} on an API error
|
|
116
|
+
*/
|
|
117
|
+
tagIterator(options?: TagIteratorOptions): AsyncGenerator<{
|
|
118
|
+
name: string;
|
|
119
|
+
sha: string;
|
|
120
|
+
}, void, unknown>;
|
|
121
|
+
/**
|
|
122
|
+
* Fetch the contents of a file from the configured branch
|
|
123
|
+
*
|
|
124
|
+
* @param {string} path The path to the file in the repository
|
|
125
|
+
* @returns {GitHubFileContents}
|
|
126
|
+
* @throws {GitHubAPIError} on other API errors
|
|
127
|
+
*/
|
|
128
|
+
getFileContents(path: string): Promise<GitHubFileContents>;
|
|
129
|
+
/**
|
|
130
|
+
* Fetch the contents of a file
|
|
131
|
+
*
|
|
132
|
+
* @param {string} path The path to the file in the repository
|
|
133
|
+
* @param {string} branch The branch to fetch from
|
|
134
|
+
* @returns {GitHubFileContents}
|
|
135
|
+
* @throws {FileNotFoundError} if the file cannot be found
|
|
136
|
+
* @throws {GitHubAPIError} on other API errors
|
|
137
|
+
*/
|
|
138
|
+
getFileContentsOnBranch(path: string, branch: string): Promise<GitHubFileContents>;
|
|
139
|
+
getFileJson<T>(path: string, branch: string): Promise<T>;
|
|
140
|
+
/**
|
|
141
|
+
* Returns a list of paths to all files with a given name.
|
|
142
|
+
*
|
|
143
|
+
* If a prefix is specified, only return paths that match
|
|
144
|
+
* the provided prefix.
|
|
145
|
+
*
|
|
146
|
+
* @param filename The name of the file to find
|
|
147
|
+
* @param prefix Optional path prefix used to filter results
|
|
148
|
+
* @returns {string[]} List of file paths
|
|
149
|
+
* @throws {GitHubAPIError} on an API error
|
|
150
|
+
*/
|
|
151
|
+
findFilesByFilename(filename: string, prefix?: string): Promise<string[]>;
|
|
152
|
+
/**
|
|
153
|
+
* Returns a list of paths to all files with a given name.
|
|
154
|
+
*
|
|
155
|
+
* If a prefix is specified, only return paths that match
|
|
156
|
+
* the provided prefix.
|
|
157
|
+
*
|
|
158
|
+
* @param filename The name of the file to find
|
|
159
|
+
* @param ref Git reference to search files in
|
|
160
|
+
* @param prefix Optional path prefix used to filter results
|
|
161
|
+
* @throws {GitHubAPIError} on an API error
|
|
162
|
+
*/
|
|
163
|
+
findFilesByFilenameAndRef: (filename: string, ref: string, prefix?: string | undefined) => Promise<string[]>;
|
|
164
|
+
/**
|
|
165
|
+
* Returns a list of paths to all files matching a glob pattern.
|
|
166
|
+
*
|
|
167
|
+
* If a prefix is specified, only return paths that match
|
|
168
|
+
* the provided prefix.
|
|
169
|
+
*
|
|
170
|
+
* @param glob The glob to match
|
|
171
|
+
* @param prefix Optional path prefix used to filter results
|
|
172
|
+
* @returns {string[]} List of file paths
|
|
173
|
+
* @throws {GitHubAPIError} on an API error
|
|
174
|
+
*/
|
|
175
|
+
findFilesByGlob(glob: string, prefix?: string): Promise<string[]>;
|
|
176
|
+
/**
|
|
177
|
+
* Returns a list of paths to all files matching a glob pattern.
|
|
178
|
+
*
|
|
179
|
+
* If a prefix is specified, only return paths that match
|
|
180
|
+
* the provided prefix.
|
|
181
|
+
*
|
|
182
|
+
* @param glob The glob to match
|
|
183
|
+
* @param ref Git reference to search files in
|
|
184
|
+
* @param prefix Optional path prefix used to filter results
|
|
185
|
+
* @throws {GitHubAPIError} on an API error
|
|
186
|
+
*/
|
|
187
|
+
findFilesByGlobAndRef: (glob: string, ref: string, prefix?: string | undefined) => Promise<string[]>;
|
|
188
|
+
/**
|
|
189
|
+
* Open a pull request
|
|
190
|
+
*
|
|
191
|
+
* @param {PullRequest} pullRequest Pull request data to update
|
|
192
|
+
* @param {string} targetBranch The base branch of the pull request
|
|
193
|
+
* @param {string} message The commit message for the commit
|
|
194
|
+
* @param {Update[]} updates The files to update
|
|
195
|
+
* @param {CreatePullRequestOptions} options The pull request options
|
|
196
|
+
* @throws {GitHubAPIError} on an API error
|
|
197
|
+
*/
|
|
198
|
+
createPullRequest(pullRequest: PullRequest, targetBranch: string, message: string, updates: Update[], options?: CreatePullRequestOptions): Promise<PullRequest>;
|
|
199
|
+
/**
|
|
200
|
+
* Fetch a pull request given the pull number
|
|
201
|
+
* @param {number} number The pull request number
|
|
202
|
+
* @returns {PullRequest}
|
|
203
|
+
*/
|
|
204
|
+
getPullRequest(number: number): Promise<PullRequest>;
|
|
205
|
+
/**
|
|
206
|
+
* Update a pull request's title and body.
|
|
207
|
+
* @param {number} number The pull request number
|
|
208
|
+
* @param {ReleasePullRequest} releasePullRequest Pull request data to update
|
|
209
|
+
* @param {string} targetBranch The target branch of the pull request
|
|
210
|
+
* @param {string} options.signoffUser Optional. Commit signoff message
|
|
211
|
+
* @param {boolean} options.fork Optional. Whether to open the pull request from
|
|
212
|
+
* a fork or not. Defaults to `false`
|
|
213
|
+
* @param {PullRequestOverflowHandler} options.pullRequestOverflowHandler Optional.
|
|
214
|
+
* Handles extra large pull request body messages.
|
|
215
|
+
*/
|
|
216
|
+
updatePullRequest(number: number, releasePullRequest: ReleasePullRequest, targetBranch: string, options?: ScmUpdatePullRequestOptions): Promise<PullRequest>;
|
|
217
|
+
/**
|
|
218
|
+
* Given a set of proposed updates, build a changeset to suggest.
|
|
219
|
+
*
|
|
220
|
+
* @param {Update[]} updates The proposed updates
|
|
221
|
+
* @param {string} defaultBranch The target branch
|
|
222
|
+
* @return {Changes} The changeset to suggest.
|
|
223
|
+
* @throws {GitHubAPIError} on an API error
|
|
224
|
+
*/
|
|
225
|
+
buildChangeSet(updates: Update[], defaultBranch: string): Promise<ChangeSet>;
|
|
226
|
+
/**
|
|
227
|
+
* Returns a list of paths to all files with a given file
|
|
228
|
+
* extension.
|
|
229
|
+
*
|
|
230
|
+
* If a prefix is specified, only return paths that match
|
|
231
|
+
* the provided prefix.
|
|
232
|
+
*
|
|
233
|
+
* @param extension The file extension used to filter results.
|
|
234
|
+
* Example: `js`, `java`
|
|
235
|
+
* @param ref Git reference to search files in
|
|
236
|
+
* @param prefix Optional path prefix used to filter results
|
|
237
|
+
* @returns {string[]} List of file paths
|
|
238
|
+
* @throws {GitHubAPIError} on an API error
|
|
239
|
+
*/
|
|
240
|
+
findFilesByExtensionAndRef: (extension: string, ref: string, prefix?: string | undefined) => Promise<string[]>;
|
|
241
|
+
/**
|
|
242
|
+
* Returns a list of paths to all files with a given file
|
|
243
|
+
* extension.
|
|
244
|
+
*
|
|
245
|
+
* If a prefix is specified, only return paths that match
|
|
246
|
+
* the provided prefix.
|
|
247
|
+
*
|
|
248
|
+
* @param extension The file extension used to filter results.
|
|
249
|
+
* Example: `js`, `java`
|
|
250
|
+
* @param prefix Optional path prefix used to filter results
|
|
251
|
+
* @returns {string[]} List of file paths
|
|
252
|
+
* @throws {GitHubAPIError} on an API error
|
|
253
|
+
*/
|
|
254
|
+
findFilesByExtension(extension: string, prefix?: string): Promise<string[]>;
|
|
255
|
+
/**
|
|
256
|
+
* Create a GitHub release
|
|
257
|
+
*
|
|
258
|
+
* @param {Release} release Release parameters
|
|
259
|
+
* @param {ReleaseOptions} options Release option parameters
|
|
260
|
+
* @throws {DuplicateReleaseError} if the release tag already exists
|
|
261
|
+
* @throws {GitHubAPIError} on other API errors
|
|
262
|
+
*/
|
|
263
|
+
createRelease(release: Release, options?: ReleaseOptions): Promise<GitHubRelease>;
|
|
264
|
+
/**
|
|
265
|
+
* Makes a comment on a issue/pull request.
|
|
266
|
+
*
|
|
267
|
+
* @param {string} comment - The body of the comment to post.
|
|
268
|
+
* @param {number} number - The issue or pull request number.
|
|
269
|
+
* @throws {GitHubAPIError} on an API error
|
|
270
|
+
*/
|
|
271
|
+
commentOnIssue(comment: string, number: number): Promise<string>;
|
|
272
|
+
/**
|
|
273
|
+
* Removes labels from an issue/pull request.
|
|
274
|
+
*
|
|
275
|
+
* @param {string[]} labels The labels to remove.
|
|
276
|
+
* @param {number} number The issue/pull request number.
|
|
277
|
+
*/
|
|
278
|
+
removeIssueLabels(labels: string[], number: number): Promise<void>;
|
|
279
|
+
/**
|
|
280
|
+
* Adds label to an issue/pull request.
|
|
281
|
+
*
|
|
282
|
+
* @param {string[]} labels The labels to add.
|
|
283
|
+
* @param {number} number The issue/pull request number.
|
|
284
|
+
*/
|
|
285
|
+
addIssueLabels(labels: string[], number: number): Promise<void>;
|
|
286
|
+
/**
|
|
287
|
+
* Generate release notes from GitHub at tag
|
|
288
|
+
* @param {string} tagName Name of new release tag
|
|
289
|
+
* @param {string} targetCommitish Target commitish for new tag
|
|
290
|
+
* @param {string} previousTag Optional. Name of previous tag to analyze commits since
|
|
291
|
+
*/
|
|
292
|
+
generateReleaseNotes(tagName: string, targetCommitish: string, previousTag?: string): Promise<string>;
|
|
293
|
+
/**
|
|
294
|
+
* Create a single file on a new branch based on an existing
|
|
295
|
+
* branch. This will force-push to that branch.
|
|
296
|
+
* @param {string} filename Filename with path in the repository
|
|
297
|
+
* @param {string} contents Contents of the file
|
|
298
|
+
* @param {string} newBranchName Name of the new branch
|
|
299
|
+
* @param {string} baseBranchName Name of the base branch (where
|
|
300
|
+
* new branch is forked from)
|
|
301
|
+
* @returns {string} HTML URL of the new file
|
|
302
|
+
*/
|
|
303
|
+
createFileOnNewBranch(filename: string, contents: string, newBranchName: string, baseBranchName: string): Promise<string>;
|
|
304
|
+
}
|
|
305
|
+
export declare const sleepInMs: (ms: number) => Promise<unknown>;
|
|
306
|
+
export {};
|