Skip to content

Add artifact exclusion and goal mode orchestration logic - #201

Open
mashan555 wants to merge 6 commits into
mainfrom
fadeeva/goal-in-action
Open

Add artifact exclusion and goal mode orchestration logic#201
mashan555 wants to merge 6 commits into
mainfrom
fadeeva/goal-in-action

Conversation

@mashan555

Copy link
Copy Markdown
Contributor

No description provided.

@mashan555
mashan555 deployed to junie-review August 11, 2026 08:48 — with GitHub Actions Active
@junie-jetbrains

junie-jetbrains Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Address the identified logic and naming concerns to improve the robustness and clarity of the new artifact exclusion utility.

Comments

  • src/utils/git-exclude.ts:96: Check if the header already exists before appending it to avoid duplication when patterns are added incrementally.
  • test/utils/git-exclude.test.ts:61: Rename the test to reflect that the pattern is appended even if it is currently present as a comment.

Help us improve Junie code review (EAP): Share feedback

Comment thread src/utils/git-exclude.ts
Comment on lines +94 to +96
// Keep whatever the checkout already excluded and append below it.
const prefix = existing === "" || existing.endsWith("\n") ? existing : `${existing}\n`;
fs.writeFileSync(excludePath, `${prefix}${EXCLUDE_HEADER}\n${missing.join("\n")}\n`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Keep whatever the checkout already excluded and append below it.
const prefix = existing === "" || existing.endsWith("\n") ? existing : `${existing}\n`;
fs.writeFileSync(excludePath, `${prefix}${EXCLUDE_HEADER}\n${missing.join("\n")}\n`);
// Keep whatever the checkout already excluded and append below it.
const prefix = existing === "" || existing.endsWith("\n") ? existing : `${existing}\n`;
const header = existing.includes(EXCLUDE_HEADER) ? "" : `${EXCLUDE_HEADER}\n`;
fs.writeFileSync(excludePath, `${prefix}${header}${missing.join("\n")}\n`);

Check if the header already exists before appending it to avoid duplication when patterns are added incrementally.

Comment on lines +61 to +68
test("does not append a pattern that is only present as a comment", () => {
fs.mkdirSync(path.dirname(excludePath), {recursive: true});
fs.writeFileSync(excludePath, "# .junie/plans/\n");

const added = addGitExcludePatterns([".junie/plans/"], repoDir);

expect(added).toEqual([".junie/plans/"]);
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test name is misleading. It should indicate that the pattern is appended even if present as a comment, as the expectation expect(added).toEqual([".junie/plans/"]) confirms.

@mashan555
mashan555 force-pushed the fadeeva/goal-in-action branch 2 times, most recently from 7c029e6 to 3388487 Compare August 11, 2026 10:48
@mashan555
mashan555 force-pushed the fadeeva/goal-in-action branch from 3388487 to ecb313a Compare August 11, 2026 12:13
@mashan555
mashan555 force-pushed the fadeeva/goal-in-action branch from 20c2d27 to b3cba92 Compare August 11, 2026 12:33
…e PR and commit titles, updated workflows, and expanded regex handling logic with tests
…ed PR title resolution and agent artifact exclusion logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant