Skip to content

Commit e2fc056

Browse files
committed
chore: rename addDirectory -> addFromDirectory
1 parent 9dcbdc0 commit e2fc056

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.changeset/mean-trainers-develop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"@changesets/ghcommit": minor
33
---
44

5-
Introduce `addDirectory` option for `commitChangesFromRepo` to allow users to
5+
Introduce `addFromDirectory` option for `commitChangesFromRepo` to allow users to
66
specify a subdirectory of the git repository that should be used to add files
77
from, rather then adding all changed files.
88

src/git.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const FILE_MODES = {
2020
export const commitChangesFromRepo = async ({
2121
base,
2222
repoDirectory,
23-
addDirectory,
23+
addFromDirectory,
2424
log,
2525
...otherArgs
2626
}: CommitChangesFromRepoArgs): Promise<CommitFilesResult> => {
@@ -50,7 +50,7 @@ export const commitChangesFromRepo = async ({
5050
};
5151
await git.walk({
5252
fs,
53-
dir: addDirectory ?? resolvedRepoDirectory,
53+
dir: addFromDirectory ?? resolvedRepoDirectory,
5454
trees,
5555
map: async (filepath, [commit, workdir]) => {
5656
// Don't include ignored files

src/interface.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ export interface CommitChangesFromRepoArgs extends CommitFilesBasedArgs {
112112
*/
113113
repoDirectory?: string;
114114
/**
115-
* Which directory to add the files from.
115+
* The starting directory to recurse from when detecting changed files.
116116
*
117117
* Useful for monorepos where you want to add files from a specific directory only.
118118
*
119-
* Defaults to resolved value as {@link repoDirectory},
119+
* Defaults to resolved value of {@link repoDirectory},
120120
* which will add all changed files in the repository.
121121
*/
122-
addDirectory?: string;
122+
addFromDirectory?: string;
123123
}

0 commit comments

Comments
 (0)