Skip to content

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

Open
ecrupper wants to merge 1 commit intomainfrom
fix/panic-on-failed-compile
Open

fix(webhook): generate token for status update on failed compile#1412
ecrupper wants to merge 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).

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 ⚠️
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.

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