Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/afraid-ducks-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@changesets/ghcommit": major
---

Make `repo` argument required,
and remove the `repository` argument which was deprecated
and previously could be used in its place.
8 changes: 1 addition & 7 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,16 @@ export const commitFilesFromBase64 = async ({
octokit,
owner,
repo,
repository,
branch,
base,
force = false,
message,
fileChanges,
log,
}: CommitFilesFromBase64Args): Promise<CommitFilesResult> => {
const repositoryNameWithOwner = `${owner}/${repository}`;
const repositoryNameWithOwner = `${owner}/${repo}`;
const baseRef = getBaseRef(base);
const targetRef = `refs/heads/${branch}`;
repo = repo ?? repository;

if (!repo) {
throw new Error(`Argument 'repo' must be provided`);
}

log?.debug(`Getting repo info ${repositoryNameWithOwner}`);
const info = await getRepositoryMetadata(octokit, {
Expand Down
4 changes: 1 addition & 3 deletions src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ export type GitBase =
export interface CommitFilesBasedArgs {
octokit: GitHubClient;
owner: string;
repo?: string;
/** @deprecated use {@link repo} instead */
repository?: string;
repo: string;
branch: string;
/**
* Push the commit even if the branch exists and does not match what was
Expand Down