Skip to content

Commit

Permalink
Merge branch 'merge-jmcvetta' into resource-project-access-token
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcvetta committed Oct 16, 2020
2 parents 42694f5 + 2e0c719 commit efa0d98
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: golangci-lint
on:
pull_request:
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.29

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
10 changes: 8 additions & 2 deletions rollbar/data_source_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,14 @@ func dataSourceProjectRead(d *schema.ResourceData, meta interface{}) error {

id := fmt.Sprintf("%d", project.Id)
d.SetId(id)
d.Set("account_id", project.AccountId)
d.Set("date_created", project.DateCreated)
err = d.Set("account_id", project.AccountId)
if err != nil {
return err
}
err = d.Set("date_created", project.DateCreated)
if err != nil {
return err
}

return nil
}
4 changes: 4 additions & 0 deletions rollbar/resource_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,13 @@ func resourceProjectRead(ctx context.Context, d *schema.ResourceData, m interfac
return diags
}

/*
No need for this function until we have update support in the Rollbar API.
func resourceProjectUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
return resourceProjectRead(ctx, d, m)
}
*/

func resourceProjectDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
var diags diag.Diagnostics
Expand Down

0 comments on commit efa0d98

Please sign in to comment.