Skip to content

Commit f892668

Browse files
authored
Chore: Some import order changes (#458)
This is a test PR to test workflows. No functionality change has introduced. Context about the workflow changes: https://raintank-corp.slack.com/archives/C08PXG0H960/p1746021293905729?thread_ts=1745941388.694869&cid=C08PXG0H960
1 parent 1251e1a commit f892668

File tree

13 files changed

+30
-17
lines changed

13 files changed

+30
-17
lines changed

.github/workflows/publish.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Plugins - CD
22
run-name: Deploy ${{ inputs.branch }} to ${{ inputs.environment }} by @${{ github.actor }}
3-
permissions: {}
3+
permissions:
4+
contents: read
5+
id-token: write
46

57
on:
68
workflow_dispatch:

.github/workflows/push.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Plugins - CI
2-
permissions: {}
2+
permissions:
3+
contents: read
4+
id-token: write
35

46
on:
57
push:

.github/workflows/update-make-docs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Update `make docs` procedure
2-
permissions: {}
2+
permissions:
3+
contents: write
4+
pull-requests: write
35

46
on:
57
schedule:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ The first selection is used to filter the events that display on the graph. For
3939

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

42-
Typically these will be the same, however there are some cases where you may want them to be different.
42+
Typically, these will be the same, however there are some cases where you may want them to be different.

pkg/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ package main
33
import (
44
"os"
55

6-
"github.com/grafana/github-datasource/pkg/plugin"
76
"github.com/grafana/grafana-plugin-sdk-go/backend"
87
"github.com/grafana/grafana-plugin-sdk-go/backend/datasource"
8+
9+
"github.com/grafana/github-datasource/pkg/plugin"
910
)
1011

1112
const dsID = "grafana-github-datasource"

pkg/models/packages.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var validPackageTypes = []githubv4.PackageType{
3939
githubv4.PackageTypePypi,
4040
}
4141

42-
// notSupportedPackageTypes is a list of package types that are not supported by the GitHub graphql API
42+
// notSupportedPackageTypes is a list of package types that are not supported by the GitHub graphql API
4343
// They were supported in the past but are not supported anymore and we want to return an error if they are used
4444
var notSupportedPackageTypes = []githubv4.PackageType{
4545
githubv4.PackageTypeNpm,
@@ -56,4 +56,4 @@ func validatePackageType(packageType githubv4.PackageType) error {
5656
return backend.DownstreamError(fmt.Errorf("package type %q is not supported. Valid types are: MAVEN, DOCKER, DEBIAN, PYPI", packageType))
5757
}
5858
return backend.DownstreamError(fmt.Errorf("invalid package type %q. Valid types are: MAVEN, DOCKER, DEBIAN, PYPI", packageType))
59-
}
59+
}

pkg/models/packages_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ func Test_validatePackageType(t *testing.T) {
8080
}
8181
})
8282
}
83-
}
83+
}

pkg/plugin/datasource.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ package plugin
33
import (
44
"context"
55

6+
"github.com/grafana/grafana-plugin-sdk-go/backend"
7+
68
"github.com/grafana/github-datasource/pkg/dfutil"
79
"github.com/grafana/github-datasource/pkg/models"
8-
"github.com/grafana/grafana-plugin-sdk-go/backend"
910
)
1011

1112
// The Datasource type handles the requests sent to the datasource backend

pkg/plugin/datasource_caching.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ import (
99
"sync"
1010
"time"
1111

12-
"github.com/grafana/github-datasource/pkg/dfutil"
13-
"github.com/grafana/github-datasource/pkg/models"
1412
"github.com/grafana/grafana-plugin-sdk-go/backend"
1513
"github.com/pkg/errors"
14+
15+
"github.com/grafana/github-datasource/pkg/dfutil"
16+
"github.com/grafana/github-datasource/pkg/models"
1617
)
1718

1819
// CacheDuration is a constant that defines how long to keep cached elements before they are refreshed

pkg/plugin/datasource_caching_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ package plugin
22

33
import (
44
"encoding/json"
5+
"sync"
6+
"testing"
7+
58
"github.com/grafana/grafana-plugin-sdk-go/backend"
69
"github.com/grafana/grafana-plugin-sdk-go/data"
710
"github.com/stretchr/testify/assert"
8-
"sync"
9-
"testing"
1011
)
1112

1213
// mockFramer is a struct implementing the Framer interface that returns predefined frames for testing purposes

0 commit comments

Comments
 (0)