ocean icon indicating copy to clipboard operation
ocean copied to clipboard

[Integration][Github] Added Support for Issue Kind

Open emekanwaoma opened this issue 7 months ago • 1 comments

Description

What - Added support for GitHub Issues as a new resource kind in the GitHub v2 integration

Why - Customers need to track GitHub Issues alongside Pull Requests to have complete visibility of their development processes within Port

How - Implemented the issue exporter and webhook processor following the same patterns as the existing pull request feature

Type of change

Please leave one option from the following and delete the rest:

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] New Integration (non-breaking change which adds a new integration)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Non-breaking change (fix of existing functionality that will not change current behavior)
  • [ ] Documentation (added/updated documentation)

All tests should be run against the port production environment(using a testing org).

Core testing checklist

  • [ ] Integration able to create all default resources from scratch
  • [ ] Resync finishes successfully
  • [ ] Resync able to create entities
  • [ ] Resync able to update entities
  • [ ] Resync able to detect and delete entities
  • [ ] Scheduled resync able to abort existing resync and start a new one
  • [ ] Tested with at least 2 integrations from scratch
  • [ ] Tested with Kafka and Polling event listeners
  • [ ] Tested deletion of entities that don't pass the selector

Integration testing checklist

  • [ ] Integration able to create all default resources from scratch
  • [ ] Resync able to create entities
  • [ ] Resync able to update entities
  • [ ] Resync able to detect and delete entities
  • [ ] Resync finishes successfully
  • [ ] If new resource kind is added or updated in the integration, add example raw data, mapping and expected result to the examples folder in the integration directory.
  • [ ] If resource kind is updated, run the integration with the example data and check if the expected result is achieved
  • [ ] If new resource kind is added or updated, validate that live-events for that resource are working as expected
  • [ ] Docs PR link here

Preflight checklist

  • [ ] Handled rate limiting
  • [ ] Handled pagination
  • [ ] Implemented the code in async
  • [ ] Support Multi account

Screenshots

Include screenshots from your environment showing how the resources of the integration will look.

API Documentation

Provide links to the API documentation used for this integration. GitHub Issues API GitHub Webhooks for Issues

emekanwaoma avatar May 16 '25 14:05 emekanwaoma

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-1639.d1ftd8v2gowp8w.amplifyapp.com

CI Feedback 🧐

(Feedback updated until commit https://github.com/port-labs/ocean/commit/8eee5dcf663e3902c5d2cb8764dd9a3f61d535e5)

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: 🚢 github

Failed stage: Lint [❌]

Failure summary:

The action failed because the Black code formatter check failed. Black detected that the file
/home/runner/work/ocean/ocean/integrations/github/main.py would be reformatted, indicating that the
code formatting does not comply with Black's standards. The linting process failed with exit code 1,
causing the overall make command to fail with exit code 2.

Relevant error logs:
1:  ##[group]Runner Image Provisioner
2:  Hosted Compute Agent
...

1095:  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.10/x64/lib
1096:  ##[endgroup]
1097:  Running poetry check
1098:  All set!
1099:  Running mypy
1100:  Success: no issues found in 49 source files
1101:  Running ruff
1102:  warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
1103:  - 'ignore' -> 'lint.ignore'
1104:  All checks passed!
1105:  Running black
1106:  would reformat /home/runner/work/ocean/ocean/integrations/github/main.py
1107:  Oh no! 💥 💔 💥
1108:  1 file would be reformatted, 48 files would be left unchanged.
1109:  Running yamllint
1110:  [0;31mOne or more checks failed with exit code 1[0m
1111:  make: *** [../_infra/Makefile:62: lint] Error 1
1112:  ##[error]Process completed with exit code 2.
1113:  Post job cleanup.

qodo-code-review[bot] avatar Jun 05 '25 15:06 qodo-code-review[bot]