This pull request introduces a new module for handling GitHub's Code Scanning API. The changes span across multiple files, adding new functionality, updating existing modules, and including tests to ensure the new features work correctly.
New Feature: Code Scanning API Support
Modules and Handlers:
Added code_scannings module to src/api.rs and src/models.rs. ([[1]](diffhunk://#diff-adea2445327e39eb215de697b440dbbc02135357380fb612a10a9e659129a46bR5), [[2]](diffhunk://#diff-623892a814b2aa624c59933bec54e6f0a8d9af2aea2c395f4b83418de364a3afR17))
Implemented CodeScanningHandler to handle API requests for code scanning alerts. ([src/api/code_scannings.rsR1-R43](diffhunk://#diff-1b917f448d02f4156ee44813b4eaf6473910424ab7df65240bd2b86e47ad2d20R1-R43))
Added ListCodeScanningsBuilder to support listing code scanning alerts with various filters. ([src/api/code_scannings/list.rsR1-R100](diffhunk://#diff-23f42deacaa86d3169629b47490f4720dcdec9fda1858beff20b90ca30837ff4R1-R100))
Models:
Added new models in src/models/code_scannings.rs to represent code scanning alerts and related entities. ([src/models/code_scannings.rsR1-R107](diffhunk://#diff-36006034955149579d6c3788efe20851ef91723235b0348fd1307e10cb662526R1-R107))
Updated id_type! macro to include CodeScanningId. ([src/models.rsR109](diffhunk://#diff-623892a814b2aa624c59933bec54e6f0a8d9af2aea2c395f4b83418de364a3afR109))
Parameters:
Added new parameter types for sorting, filtering, and specifying references in code scanning alerts. ([src/params.rsR177-R263](diffhunk://#diff-96db4c2e87979d88bcea716895d0d011b21c2243b7c1e2175e73a25259e43578R177-R263))
Tests:
Added tests for listing and retrieving code scanning alerts, including mock server setups and response handling. ([[1]](diffhunk://#diff-92be937d4bcc254123d34a9d7c8e811dea2945c661ba08e4ad0c4ffcd1de14c6R1-R102), [[2]](diffhunk://#diff-0133387ad261e433eaa75501f44ef68985d9773899aec8249a91084fb87b021bR1-R109))
Included JSON resources for testing code scanning alerts. ([[1]](diffhunk://#diff-f366cd839d329faf93f9d229eb747002e361aa2102ffda6f850e5966b0d2f45eR1-R5), [[2]](diffhunk://#diff-a5036676fbd767c67671e3d5103a30471c7997f95362d93e5480f8dcb414ee77R1-R72))
Documentation:
Updated README.md to include the new code_scannings module. ([README.mdR44](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R44))
This pull request introduces a new module for handling GitHub's Code Scanning API. The changes span across multiple files, adding new functionality, updating existing modules, and including tests to ensure the new features work correctly.
New Feature: Code Scanning API Support
Modules and Handlers:
code_scannings
module tosrc/api.rs
andsrc/models.rs
. ([[1]](diffhunk://#diff-adea2445327e39eb215de697b440dbbc02135357380fb612a10a9e659129a46bR5)
,[[2]](diffhunk://#diff-623892a814b2aa624c59933bec54e6f0a8d9af2aea2c395f4b83418de364a3afR17)
)CodeScanningHandler
to handle API requests for code scanning alerts. ([src/api/code_scannings.rsR1-R43](diffhunk://#diff-1b917f448d02f4156ee44813b4eaf6473910424ab7df65240bd2b86e47ad2d20R1-R43)
)ListCodeScanningsBuilder
to support listing code scanning alerts with various filters. ([src/api/code_scannings/list.rsR1-R100](diffhunk://#diff-23f42deacaa86d3169629b47490f4720dcdec9fda1858beff20b90ca30837ff4R1-R100)
)Models:
src/models/code_scannings.rs
to represent code scanning alerts and related entities. ([src/models/code_scannings.rsR1-R107](diffhunk://#diff-36006034955149579d6c3788efe20851ef91723235b0348fd1307e10cb662526R1-R107)
)id_type!
macro to includeCodeScanningId
. ([src/models.rsR109](diffhunk://#diff-623892a814b2aa624c59933bec54e6f0a8d9af2aea2c395f4b83418de364a3afR109)
)Parameters:
[src/params.rsR177-R263](diffhunk://#diff-96db4c2e87979d88bcea716895d0d011b21c2243b7c1e2175e73a25259e43578R177-R263)
)Tests:
[[1]](diffhunk://#diff-92be937d4bcc254123d34a9d7c8e811dea2945c661ba08e4ad0c4ffcd1de14c6R1-R102)
,[[2]](diffhunk://#diff-0133387ad261e433eaa75501f44ef68985d9773899aec8249a91084fb87b021bR1-R109)
)[[1]](diffhunk://#diff-f366cd839d329faf93f9d229eb747002e361aa2102ffda6f850e5966b0d2f45eR1-R5)
,[[2]](diffhunk://#diff-a5036676fbd767c67671e3d5103a30471c7997f95362d93e5480f8dcb414ee77R1-R72)
)Documentation:
README.md
to include the newcode_scannings
module. ([README.mdR44](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R44)
)