Skip to content

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

Open
yray-pixel wants to merge 5 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 5 commits into
redhat-developer:mainfrom
yray-pixel:bugfix/x2a-job-script-gitignore-issues

Conversation

@yray-pixel

@yray-pixel yray-pixel commented Jun 17, 2026

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

Add detection and logging for files that exist but weren't committed due to .gitignore rules:

  • Use git ls-files --others --ignored --exclude-standard to find gitignored files in PROJECT_DIR
  • Log clear warnings for each gitignored file
  • Display summary count of affected files

Testing

✅ Tested with repos containing *.md in .gitignore
✅ Verified warnings appear for gitignored files
✅ Verified normal files still commit correctly
✅ Verified empty PROJECT_DIR doesn't cause errors

Changes

  • Added gitignore detection logging in cleanup() function

@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

@eloycoto eloycoto left a comment

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.

congrats on your first PR in 🎉

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.57%. Comparing base (2465411) to head (0ab7a75).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3436      +/-   ##
==========================================
+ Coverage   52.43%   53.57%   +1.14%     
==========================================
  Files        2251     2250       -1     
  Lines       85725    85740      +15     
  Branches    24111    24129      +18     
==========================================
+ Hits        44948    45936     +988     
- Misses      39164    39513     +349     
+ Partials     1613      291    -1322     
Flag Coverage Δ *Carryforward flag
adoption-insights 83.70% <ø> (ø) Carriedforward from cfcc07a
ai-integrations 67.95% <ø> (ø) Carriedforward from cfcc07a
app-defaults 69.79% <ø> (ø) Carriedforward from cfcc07a
augment 46.39% <ø> (ø) Carriedforward from cfcc07a
boost ?
bulk-import 72.46% <ø> (ø) Carriedforward from cfcc07a
cost-management 14.10% <ø> (ø) Carriedforward from cfcc07a
dcm 61.79% <ø> (ø) Carriedforward from cfcc07a
extensions 61.53% <ø> (ø) Carriedforward from cfcc07a
global-floating-action-button 71.18% <ø> (ø) Carriedforward from cfcc07a
global-header 59.71% <ø> (ø) Carriedforward from cfcc07a
homepage 49.84% <ø> (ø) Carriedforward from cfcc07a
install-dynamic-plugins 56.23% <ø> (ø) Carriedforward from cfcc07a
konflux 91.49% <ø> (ø) Carriedforward from cfcc07a
lightspeed 68.59% <ø> (+0.01%) ⬆️ Carriedforward from cfcc07a
mcp-integrations 85.46% <ø> (ø) Carriedforward from cfcc07a
orchestrator 37.71% <ø> (-0.05%) ⬇️ Carriedforward from cfcc07a
quickstart 63.76% <ø> (ø) Carriedforward from cfcc07a
sandbox 79.56% <ø> (ø) Carriedforward from cfcc07a
scorecard 83.83% <ø> (ø) Carriedforward from cfcc07a
theme 61.26% <ø> (ø) Carriedforward from cfcc07a
translations 6.55% <ø> (ø) Carriedforward from cfcc07a
x2a 78.68% <ø> (+21.43%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2465411...0ab7a75. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mareklibra mareklibra added the question Further information is requested label Jun 19, 2026

@mareklibra mareklibra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, please just add changeset.

In the workspaces/x2a call yarn changeset. Then choose just the x2a-backend plugin and patch level. Write a short comment there.

Git add the newly created file.

These changesets are used for both the CHANGELOG files and triggering release.

@sonarqubecloud

Copy link
Copy Markdown

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

Labels

question Further information is requested workspace/x2a

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants