Skip to content

Chore: Some import order changes #458

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 30, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Plugins - CI
permissions: {}
permissions:
contents: read

on:
push:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/update-make-docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Update `make docs` procedure
permissions: {}
permissions:
contents: read
Copy link
Contributor

Choose a reason for hiding this comment

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

This workflow creates branches and opens PRs so may need contents: write and pull-requests: write

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jdbaldry Could you review and approve the PR? Looks like CI is waiting for your approval

    Waiting on code owner review from jdbaldry.


on:
schedule:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ The first selection is used to filter the events that display on the graph. For

The second selection is used to determine where on the graph the event should be displayed.

Typically these will be the same, however there are some cases where you may want them to be different.
Typically, these will be the same, however there are some cases where you may want them to be different.
3 changes: 2 additions & 1 deletion pkg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package main
import (
"os"

"github.com/grafana/github-datasource/pkg/plugin"
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/backend/datasource"

"github.com/grafana/github-datasource/pkg/plugin"
)

const dsID = "grafana-github-datasource"
Expand Down
4 changes: 2 additions & 2 deletions pkg/models/packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var validPackageTypes = []githubv4.PackageType{
githubv4.PackageTypePypi,
}

// notSupportedPackageTypes is a list of package types that are not supported by the GitHub graphql API
// notSupportedPackageTypes is a list of package types that are not supported by the GitHub graphql API
// They were supported in the past but are not supported anymore and we want to return an error if they are used
var notSupportedPackageTypes = []githubv4.PackageType{
githubv4.PackageTypeNpm,
Expand All @@ -56,4 +56,4 @@ func validatePackageType(packageType githubv4.PackageType) error {
return backend.DownstreamError(fmt.Errorf("package type %q is not supported. Valid types are: MAVEN, DOCKER, DEBIAN, PYPI", packageType))
}
return backend.DownstreamError(fmt.Errorf("invalid package type %q. Valid types are: MAVEN, DOCKER, DEBIAN, PYPI", packageType))
}
}
2 changes: 1 addition & 1 deletion pkg/models/packages_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ func Test_validatePackageType(t *testing.T) {
}
})
}
}
}
3 changes: 2 additions & 1 deletion pkg/plugin/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package plugin
import (
"context"

"github.com/grafana/grafana-plugin-sdk-go/backend"

"github.com/grafana/github-datasource/pkg/dfutil"
"github.com/grafana/github-datasource/pkg/models"
"github.com/grafana/grafana-plugin-sdk-go/backend"
)

// The Datasource type handles the requests sent to the datasource backend
Expand Down
5 changes: 3 additions & 2 deletions pkg/plugin/datasource_caching.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ import (
"sync"
"time"

"github.com/grafana/github-datasource/pkg/dfutil"
"github.com/grafana/github-datasource/pkg/models"
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/pkg/errors"

"github.com/grafana/github-datasource/pkg/dfutil"
"github.com/grafana/github-datasource/pkg/models"
)

// CacheDuration is a constant that defines how long to keep cached elements before they are refreshed
Expand Down
5 changes: 3 additions & 2 deletions pkg/plugin/datasource_caching_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package plugin

import (
"encoding/json"
"sync"
"testing"

"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/data"
"github.com/stretchr/testify/assert"
"sync"
"testing"
)

// mockFramer is a struct implementing the Framer interface that returns predefined frames for testing purposes
Expand Down
5 changes: 3 additions & 2 deletions pkg/plugin/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"context"
"fmt"

"github.com/grafana/github-datasource/pkg/github"
"github.com/grafana/github-datasource/pkg/models"
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/backend/instancemgmt"

"github.com/grafana/github-datasource/pkg/github"
"github.com/grafana/github-datasource/pkg/models"
)

// NewGitHubInstance creates a new GitHubInstance using the settings to determine if things like the Caching Wrapper should be enabled
Expand Down
3 changes: 2 additions & 1 deletion pkg/testutil/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"testing"

googlegithub "github.com/google/go-github/v53/github"
"github.com/grafana/github-datasource/pkg/models"
"github.com/grafana/grafana-plugin-sdk-go/backend"

"github.com/grafana/github-datasource/pkg/models"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion pkg/testutil/frames.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"path/filepath"
"testing"

"github.com/grafana/github-datasource/pkg/dfutil"
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/experimental"

"github.com/grafana/github-datasource/pkg/dfutil"
)

// UpdateGoldenFiles defines whether or not to update the files locally after checking the responses for validity
Expand Down