Skip to content

fix(webhook): generate token for status update on failed compile#1412

Merged
ecrupper merged 1 commit intomainfrom
fix/panic-on-failed-compile
Mar 11, 2026
Merged

fix(webhook): generate token for status update on failed compile#1412
ecrupper merged 1 commit intomainfrom
fix/panic-on-failed-compile

Conversation

@ecrupper
Copy link
Contributor

This line of code causes panics due to the fact that p is nil whenever there is an error from CompileAndPublish.

For app installs, we should generate an install token with default access, and for non-app installs, we should use the owner token.

I also updated GetNetrcPassword to accept repos and perms rather than a yaml object. Felt more appropriate.

@ecrupper ecrupper requested a review from a team as a code owner March 10, 2026 19:56
@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 26.66667% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.23%. Comparing base (22950e6) to head (19fc584).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
api/webhook/post.go 0.00% 9 Missing ⚠️
api/build/cancel.go 0.00% 1 Missing ⚠️
compiler/native/compile.go 0.00% 1 Missing ⚠️

❌ Your project status has failed because the head coverage (58.23%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1412      +/-   ##
==========================================
- Coverage   58.25%   58.23%   -0.03%     
==========================================
  Files         660      660              
  Lines       25285    25292       +7     
==========================================
- Hits        14730    14729       -1     
- Misses       9871     9879       +8     
  Partials      684      684              
Files with missing lines Coverage Δ
scm/github/repo.go 76.17% <100.00%> (-0.07%) ⬇️
api/build/cancel.go 0.00% <0.00%> (ø)
compiler/native/compile.go 74.25% <0.00%> (ø)
api/webhook/post.go 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@wass3rw3rk wass3rw3rk left a comment

Choose a reason for hiding this comment

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

ty

@ecrupper ecrupper merged commit 703040d into main Mar 11, 2026
10 of 13 checks passed
@ecrupper ecrupper deleted the fix/panic-on-failed-compile branch March 11, 2026 14:55
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.

3 participants