Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

getting Code Scanning #669

Merged
merged 6 commits into from
Jul 30, 2024
Merged

getting Code Scanning #669

merged 6 commits into from
Jul 30, 2024

Conversation

adrienpessu
Copy link
Contributor

@adrienpessu adrienpessu commented Jul 26, 2024

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]](https://github.com/XAMPPRocky/octocrab/pull/669/files#diff-adea2445327e39eb215de697b440dbbc02135357380fb612a10a9e659129a46bR5), [[2]](https://github.com/XAMPPRocky/octocrab/pull/669/files#diff-623892a814b2aa624c59933bec54e6f0a8d9af2aea2c395f4b83418de364a3afR17))
  • Implemented CodeScanningHandler to handle API requests for code scanning alerts. ([src/api/code_scannings.rsR1-R43](https://github.com/XAMPPRocky/octocrab/pull/669/files#diff-1b917f448d02f4156ee44813b4eaf6473910424ab7df65240bd2b86e47ad2d20R1-R43))
  • Added ListCodeScanningsBuilder to support listing code scanning alerts with various filters. ([src/api/code_scannings/list.rsR1-R100](https://github.com/XAMPPRocky/octocrab/pull/669/files#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](https://github.com/XAMPPRocky/octocrab/pull/669/files#diff-36006034955149579d6c3788efe20851ef91723235b0348fd1307e10cb662526R1-R107))
  • Updated id_type! macro to include CodeScanningId. ([src/models.rsR109](https://github.com/XAMPPRocky/octocrab/pull/669/files#diff-623892a814b2aa624c59933bec54e6f0a8d9af2aea2c395f4b83418de364a3afR109))

Parameters:

  • Added new parameter types for sorting, filtering, and specifying references in code scanning alerts. ([src/params.rsR177-R263](https://github.com/XAMPPRocky/octocrab/pull/669/files#diff-96db4c2e87979d88bcea716895d0d011b21c2243b7c1e2175e73a25259e43578R177-R263))

Tests:

  • Added tests for listing and retrieving code scanning alerts, including mock server setups and response handling. ([[1]](https://github.com/XAMPPRocky/octocrab/pull/669/files#diff-92be937d4bcc254123d34a9d7c8e811dea2945c661ba08e4ad0c4ffcd1de14c6R1-R102), [[2]](https://github.com/XAMPPRocky/octocrab/pull/669/files#diff-0133387ad261e433eaa75501f44ef68985d9773899aec8249a91084fb87b021bR1-R109))
  • Included JSON resources for testing code scanning alerts. ([[1]](https://github.com/XAMPPRocky/octocrab/pull/669/files#diff-f366cd839d329faf93f9d229eb747002e361aa2102ffda6f850e5966b0d2f45eR1-R5), [[2]](https://github.com/XAMPPRocky/octocrab/pull/669/files#diff-a5036676fbd767c67671e3d5103a30471c7997f95362d93e5480f8dcb414ee77R1-R72))

Documentation:

  • Updated README.md to include the new code_scannings module. ([README.mdR44](https://github.com/XAMPPRocky/octocrab/pull/669/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R44))

@adrienpessu adrienpessu changed the title Finalizing getting Code Scanning getting Code Scanning Jul 29, 2024
@adrienpessu adrienpessu marked this pull request as ready for review July 30, 2024 14:26
@XAMPPRocky
Copy link
Owner

Thank you for your PR, and congrats on your first contribution! 🎉

@XAMPPRocky XAMPPRocky merged commit 870b74a into XAMPPRocky:main Jul 30, 2024
11 checks passed
@github-actions github-actions bot mentioned this pull request Jul 29, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants