You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🪲 [Fix]: Get-GitHubContext no longer fails when there are no contexts to return (#402)
## Description
This pull request includes improvements to `Get-GitHubContext`,
replacing a thrown exception with a warning, causing it not error out if
there are no contexts to return.
### Error Handling Improvements:
* Replaced the thrown exception for missing default GitHub context with
a warning message and an early return. This prevents the script from
terminating unexpectedly.
* Added a new test case to verify that `Get-GitHubContext` does not
throw an exception when no contexts are available and returns an empty
result.
## Type of change
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [ ] 📖 [Docs]
- [x] 🪲 [Fix]
- [ ] 🩹 [Patch]
- [ ] ⚠️ [Security fix]
- [ ] 🚀 [Feature]
- [ ] 🌟 [Breaking change]
## Checklist
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
0 commit comments