Skip to content

Conversation

@hermanschaaf
Copy link
Member

Closes #9755

@cq-bot cq-bot added the snyk label Apr 7, 2023
@cq-bot cq-bot added the website label Apr 13, 2023
@github-actions
Copy link

This PR has the following changes to source plugin(s) tables:

  • Table snyk_reporting_issues was added

@hermanschaaf hermanschaaf marked this pull request as ready for review April 13, 2023 09:28
@hermanschaaf hermanschaaf requested review from a team, candiduslynx and shimonp21 and removed request for a team and shimonp21 April 13, 2023 09:28
@hermanschaaf hermanschaaf added the automerge Automatically merge once required checks pass label Apr 13, 2023
@kodiakhq kodiakhq bot merged commit bf1bfb5 into main Apr 13, 2023
@kodiakhq kodiakhq bot deleted the snyk-legacy-issues-endpoint branch April 13, 2023 09:58
@hermanschaaf hermanschaaf removed the automerge Automatically merge once required checks pass label Apr 13, 2023
Copy link
Contributor

@candiduslynx candiduslynx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only some nits

return
}
if len(args)%2 != 0 {
l.logger.Debug().Interface("args", args).Msgf("Log from Snyk SDK")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could use array here

Comment on lines +60 to +61
m = m.Interface(fmt.Sprintf("arg%02d", i), args[i])
m = m.Interface(fmt.Sprintf("arg%02d", i+1), args[i+1])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
m = m.Interface(fmt.Sprintf("arg%02d", i), args[i])
m = m.Interface(fmt.Sprintf("arg%02d", i+1), args[i+1])
m = m.Interface(fmt.Sprintf("arg_%02d", i), args[i])
m = m.Interface(fmt.Sprintf("arg_%02d", i+1), args[i+1])

m = m.Interface(fmt.Sprintf("arg%02d", i+1), args[i+1])
continue
}
if i+1 < len(args) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant, as you already checked the %2 == 0

func Issues() *schema.Table {
return &schema.Table{
Name: issuesTableName,
Description: `https://snyk.docs.apiary.io/#reference/reporting-api/get-list-of-latest-issues`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

descriptions of the other tables should've been updated, too

if (total % req.PerPage) > 0 {
pages++
}
g, gctx := errgroup.WithContext(ctx)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could've just shadowed ctx

kodiakhq bot pushed a commit that referenced this pull request Apr 13, 2023
- Make retries and retry delay configurable 
- Some documentation updates
- Some follow-up on #9762
kodiakhq bot pushed a commit that referenced this pull request Apr 25, 2023
🤖 I have created a release *beep* *boop*
---


## [2.1.0](plugins-source-snyk-v2.0.1...plugins-source-snyk-v2.1.0) (2023-04-25)


### This Release has the Following Changes to Tables
- Table `snyk_reporting_issues` was added
- Table `snyk_reporting_latest_issues` was added

### Features

* Add `snyk_reporting_issues` table ([#9762](#9762)) ([bf1bfb5](bf1bfb5))
* **snyk:** Rename `snyk_reporting_issues` to `snyk_reporting_latest_issues`, add new `snyk_reporting_issues` table ([#9972](#9972)) ([b585637](b585637))
* **snyk:** Upgrade to `github.com/cloudquery/plugin-sdk/v2` ([#9951](#9951)) ([a9c60f2](a9c60f2)), closes [#9950](#9950)


### Bug Fixes

* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.45.0 ([#9863](#9863)) ([2799d62](2799d62))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v2 to v2.2.0 ([#10135](#10135)) ([cf33b89](cf33b89))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v2 to v2.2.2 ([#10143](#10143)) ([8f887e0](8f887e0))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v2 to v2.3.0 ([#10163](#10163)) ([9a7f214](9a7f214))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v2 to v2.3.1 ([#10175](#10175)) ([5b53423](5b53423))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v2 to v2.3.3 ([#10187](#10187)) ([b185248](b185248))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v2 to v2.3.4 ([#10196](#10196)) ([c6d2f59](c6d2f59))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v2 to v2.3.5 ([#10200](#10200)) ([5a33693](5a33693))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v2 to v2.3.6 ([#10208](#10208)) ([91c80a7](91c80a7))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v2 to v2.3.8 ([#10213](#10213)) ([f358666](f358666))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v2 to v2.4.0 ([#10278](#10278)) ([a0a713e](a0a713e))
* **deps:** Update module github.com/cloudquery/snyk-sdk-go to v0.3.0 ([#9893](#9893)) ([9b97cd2](9b97cd2))
* Make retries and retry delay configurable  ([#9941](#9941)) ([b2cfaa3](b2cfaa3))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for snyk “reporting/issues” endpoint

5 participants