Skip to content

chore(x2a): job-script gitignore issues#3436

Open
yray-pixel wants to merge 2 commits into
redhat-developer:mainfrom
yray-pixel:bugfix/x2a-job-script-gitignore-issues
Open

chore(x2a): job-script gitignore issues#3436
yray-pixel wants to merge 2 commits into
redhat-developer:mainfrom
yray-pixel:bugfix/x2a-job-script-gitignore-issues

Conversation

@yray-pixel

Copy link
Copy Markdown

Fixes FLPATH-4383

Problem

When source/target repositories have .gitignore rules blocking files like migration-plan.md, the x2a job script
would create these files but silently fail to commit them to the target repository.

Solution

  1. Include gitignored files when detecting changes: git ls-files --others --ignored --exclude-standard
  2. Force-add each file individually with git add -f "$file" (directory-level -f still respects .gitignore)

Testing

✅ Tested with nginx-example repo that has migration-plan.md in .gitignore
✅ Verified migration-plan.md is now committed in both init and analyze phases
✅ Tested nested directories with gitignored files
✅ Verified normal (non-gitignored) files still work correctly
✅ Verified empty PROJECT_DIR doesn't cause errors

Changes

  • Modified copy_changed_files() to include gitignored files
  • Modified cleanup() to force-add files individually
  • Added logging: "Processed X file(s) in PROJECT_DIR/"

@rhdh-gh-app

rhdh-gh-app Bot commented Jun 17, 2026

Copy link
Copy Markdown

Missing Changesets

The following package(s) are changed by this PR but do not have a changeset:

  • @red-hat-developer-hub/backstage-plugin-x2a-backend

See CONTRIBUTING.md for more information about how to add changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-x2a-backend workspaces/x2a/plugins/x2a-backend none v1.6.0

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant