Skip to content

fix: bootstrap custom pull event handler from local repo - #1005

Merged
isc-pbarton merged 2 commits into
mainfrom
bootstrap-pull-event-handler
Sep 9, 2026
Merged

fix: bootstrap custom pull event handler from local repo#1005
isc-pbarton merged 2 commits into
mainfrom
bootstrap-pull-event-handler

Conversation

@isc-pbarton

Copy link
Copy Markdown
Collaborator

Description

Resolves #1000
When changes are imported through a pull event handler and there's a custom pull event handler that has needs to be loaded/compiled, we now import it from the local repository / compile it. This fix makes it smoother to onboard a new instance with Import All. A side effect is that changes to a custom pull event handler will now be reflected immediately on pull.

Assumption: a custom pull event handler has no other dependencies in the repo. I think we shouldn't bother with any special handling around that case unless somebody requests it.

Testing

Unit test fully covers expected behavior (thanks Claude)

Checklist

  • This branch has the latest changes from the main branch rebased or merged.
  • [N/A] Web UI has been built (any changes in git-webui/src have matching changes in git-webui/release)
  • CHANGELOG.md entry added if appropriate.
  • [N/A] Documentation has been/will be updated

@codecov-commenter

codecov-commenter commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 50.47%. Comparing base (14ca955) to head (278b81a).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
cls/SourceControl/Git/PullEventHandler.cls 95.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1005      +/-   ##
==========================================
+ Coverage   49.95%   50.47%   +0.51%     
==========================================
  Files          23       23              
  Lines        3375     3394      +19     
==========================================
+ Hits         1686     1713      +27     
+ Misses       1689     1681       -8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@isc-dchui isc-dchui left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just one small nit

@@ -0,0 +1,99 @@
/// Tests that a pull event handler living in the repository itself can be used
/// on an instance where it has not been loaded/compiled yet - see issue #1000.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: I dislike having issue numbers around in the code base but you may differ in opionion

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have the same opionion.

@isc-pbarton
isc-pbarton merged commit 077d0f5 into main Sep 9, 2026
2 checks passed
@isc-pbarton
isc-pbarton deleted the bootstrap-pull-event-handler branch September 9, 2026 14:14
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.

ImportAll should check for custom pull handler

3 participants