This PR focuses on refactoring and reorganizing the code related to GitHub webhook actions. It also introduces a dynamic object addition into a map for different event codes.
Detailed summary:
Renamed HookAction to HookMap and made it implement Scalar<Map<String, Scalar<?>>>.
Replaced JsonObject and Repo fields in HookMap with request and repo fields respectively.
Implemented dynamic object addition into the map based on event codes in the HookMap class.
Updated the TkGitHub class to use HookMap instead of HookAction and made necessary changes to handle different events.
Removed explicit calls to OnNew and OnAttachedLabel in TkGitHub and instead used the dynamic object addition in HookMap.
Note: Imports and negligible changes are not mentioned in the summary.
✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}
closes #142
PR-Codex overview
Focus of this PR:
This PR focuses on refactoring and reorganizing the code related to GitHub webhook actions. It also introduces a dynamic object addition into a map for different event codes.
Detailed summary:
HookAction
toHookMap
and made it implementScalar<Map<String, Scalar<?>>>
.JsonObject
andRepo
fields inHookMap
withrequest
andrepo
fields respectively.HookMap
class.TkGitHub
class to useHookMap
instead ofHookAction
and made necessary changes to handle different events.OnNew
andOnAttachedLabel
inTkGitHub
and instead used the dynamic object addition inHookMap
.Note: Imports and negligible changes are not mentioned in the summary.