Skip to content

Commit 2bb8a4a

Browse files
authored
Convert to go mod (#35)
1 parent a2a34ed commit 2bb8a4a

17 files changed

+169
-337
lines changed

.circleci/config.yml

+24-58
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,32 @@
1-
common:
2-
godel-cache:
3-
key: &godel-cache-key v1-godel-cache-{{ checksum "godelw" }}-{{ checksum "godel/config/godel.yml" }}
4-
<<: &restore-godel-cache
5-
restore_cache:
6-
keys:
7-
- *godel-cache-key
8-
<<: &save-godel-cache
9-
save_cache:
10-
key: *godel-cache-key
11-
paths:
12-
- ~/.godel
1+
owner-repo: &owner-repo
2+
owner-repo: palantir/go-githubapp
133

14-
vendor-cache:
15-
key: &vendor-cache-key v1-vendor-cache-{{ checksum "Gopkg.lock" }}
16-
<<: &restore-vendor-cache
17-
restore_cache:
18-
keys:
19-
- *vendor-cache-key
20-
<<: &save-vendor-cache
21-
save_cache:
22-
key: *vendor-cache-key
23-
paths:
24-
- vendor
4+
excutor: &executor
5+
executor:
6+
name: go/darwin-linux-no-cgo
7+
version: 1.14-java-11-t41
8+
<<: *owner-repo
259

26-
test-results:
27-
dir: &results-dir /tmp/test-results
28-
<<: &store-results
29-
store_test_results:
30-
path: *results-dir
31-
<<: &store-artifacts
32-
store_artifacts:
33-
path: *results-dir
34-
destination: test-results
10+
version: 2.1
3511

36-
### Jobs ###
12+
orbs:
13+
go: palantir/[email protected]
14+
godel: palantir/[email protected]
3715

38-
version: 2
39-
jobs:
40-
verify:
41-
working_directory: /go/src/github.com/palantir/go-githubapp
42-
environment:
43-
TESTS_DIR: *results-dir
44-
docker:
45-
- image: circleci/golang:1.13.4-stretch
46-
steps:
47-
- checkout
48-
- *restore-godel-cache
49-
- run: ./godelw version
50-
- *save-godel-cache
51-
- *restore-vendor-cache
52-
- run: ./godelw run-dep -- ensure -vendor-only
53-
- *save-vendor-cache
54-
- run: mkdir -p "${TESTS_DIR}"
55-
- run: ./godelw verify --apply=false --junit-output="$TESTS_DIR/$CIRCLE_PROJECT_REPONAME-tests.xml"
56-
- *store-results
57-
- *store-artifacts
58-
59-
### Workflows ###
16+
all-tags-filter: &all-tags-filter
17+
filters:
18+
tags:
19+
only: /.*/
6020

6121
workflows:
6222
version: 2
63-
build:
23+
verify-test:
6424
jobs:
65-
- verify:
66-
filters: { tags: { only: /.*/ } }
25+
- godel/verify:
26+
name: verify
27+
<<: *executor
28+
<<: *all-tags-filter
29+
- godel/test:
30+
name: test
31+
<<: *executor
32+
<<: *all-tags-filter

Gopkg.lock

-238
This file was deleted.

Gopkg.toml

-13
This file was deleted.

example/config.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ import (
1818
"io/ioutil"
1919

2020
"github.com/palantir/go-baseapp/baseapp"
21+
"github.com/palantir/go-githubapp/githubapp"
2122
"github.com/pkg/errors"
2223
"gopkg.in/yaml.v2"
23-
24-
"github.com/palantir/go-githubapp/githubapp"
2524
)
2625

2726
type Config struct {

example/issue_comment.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ import (
2020
"fmt"
2121
"strings"
2222

23-
"github.com/google/go-github/github"
23+
"github.com/google/go-github/v30/github"
24+
"github.com/palantir/go-githubapp/githubapp"
2425
"github.com/pkg/errors"
2526
"github.com/rs/zerolog"
26-
27-
"github.com/palantir/go-githubapp/githubapp"
2827
)
2928

3029
type PRCommentHandler struct {

example/main.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ import (
1919

2020
"github.com/gregjones/httpcache"
2121
"github.com/palantir/go-baseapp/baseapp"
22+
"github.com/palantir/go-githubapp/githubapp"
2223
"github.com/rs/zerolog"
2324
"goji.io/pat"
24-
25-
"github.com/palantir/go-githubapp/githubapp"
2625
)
2726

2827
func main() {

githubapp/caching_client_creator.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package githubapp
1717
import (
1818
"fmt"
1919

20-
"github.com/google/go-github/github"
20+
"github.com/google/go-github/v30/github"
2121
lru "github.com/hashicorp/golang-lru"
2222
"github.com/pkg/errors"
2323
"github.com/shurcooL/githubv4"

0 commit comments

Comments
 (0)