mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Make git add work consistently with subdirectories (#473)
* Make git add work consistently with subdirectories Currently, depending on your `commitMode`, when running the action with `cwd` set to a subdirectory of a repo, the action will either: - `git-cli`: add the files changed in the subdirectory only - `github-api`: add files changed anywhere in the repository This commit brings github-api in line with git-cli, so that it only adds files in the current working directory. * Explicitly set `cwd` for all exec calls * Avoid using `ExecOptions` from `@actions/exec` * Rename type * remove redundant `filter` --------- Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
This commit is contained in:
co-authored by
Mateusz Burzyński
parent
7f0270e8f4
commit
3c24abeab2
+2
-2
@@ -66,7 +66,7 @@ type PublishOptions = {
|
||||
octokit: Octokit;
|
||||
createGithubReleases: boolean;
|
||||
git: Git;
|
||||
cwd?: string;
|
||||
cwd: string;
|
||||
};
|
||||
|
||||
type PublishedPackage = { name: string; version: string };
|
||||
@@ -85,7 +85,7 @@ export async function runPublish({
|
||||
git,
|
||||
octokit,
|
||||
createGithubReleases,
|
||||
cwd = process.cwd(),
|
||||
cwd,
|
||||
}: PublishOptions): Promise<PublishResult> {
|
||||
let [publishCommand, ...publishArgs] = script.split(/\s+/);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user