Skip to content

Commit

Permalink
Add copywrite headers and GH Action
Browse files Browse the repository at this point in the history
* HashiCorp public repos will begin being scanned for source code copyright headers starting Feb.1, 2023. We want to make sure this repo is in adherence to the automated checks.
* Add Github action which will run a check on the repo during pull requests. This is simply a validation and will not automatically correct any source.
* Bring repo up-to-date using the `copywrite` CLI.

* [GH Action](https://github.com/marketplace/actions/setup-copywrite)
* `copywrite` [CLI](https://github.com/hashicorp/copywrite#getting-started)
  • Loading branch information
barrettclark committed Jan 27, 2023
1 parent 736b359 commit 140fbab
Show file tree
Hide file tree
Showing 154 changed files with 498 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .copywrite.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
schema_version = 1

project {
license = "MPL-2.0"
copyright_year = 2018

# (OPTIONAL) A list of globs that should not have copyright/license headers.
# Supports doublestar glob patterns for more flexibility in defining which
# files or folders should be ignored
header_ignore = [
# "vendors/**",
# "**autogen**",
]
}
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

version: 2
updates:
- package-ecosystem: gomod
Expand Down
3 changes: 3 additions & 0 deletions .github/scripts/build-tflocal/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions .github/scripts/fetch_outputs/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package main

import (
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/copywrite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Copywrite

on:
push:
tags:
- v*
branches:
- main
pull_request:
workflow_dispatch:

jobs:
copywrite:
name: Run Header Copyright
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0

- name: Install Copywrite
id: install
uses: hashicorp/[email protected]

- name: Output Installed Copywrite Version
run: echo "Installed Copywrite CLI ${{steps.install.outputs.version}}"

- name: Run Copywrite Header Compliance
run: copywrite headers --plan
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

run:
timeout: 5m
linters:
Expand Down
3 changes: 3 additions & 0 deletions admin_organization.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_organization_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_run.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_run_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_setting.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

// AdminSettings describes all the admin settings related methods that the Terraform Enterprise API supports.
Expand Down
3 changes: 3 additions & 0 deletions admin_setting_cost_estimation.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_setting_cost_estimation_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_setting_customization.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_setting_customization_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_setting_general.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_setting_general_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_setting_saml.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_setting_saml_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_setting_smtp.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_setting_smtp_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_setting_twilio.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_setting_twilio_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_terraform_version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_terraform_version_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_user.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_user_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_workspace.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions admin_workspace_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions agent.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions agent_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions agent_pool.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions agent_pool_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions agent_token.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions agent_token_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions apply.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions apply_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions audit_trail.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions audit_trail_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions comment.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions comment_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions configuration_version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions configuration_version_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions cost_estimate.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions cost_estimate_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions errors.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions example_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package tfe

import (
Expand Down
3 changes: 3 additions & 0 deletions examples/configuration_versions/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions examples/organizations/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions examples/registry_modules/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions examples/workspaces/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions generate_mocks.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

set -euf -o pipefail

mockgen -source=run.go -destination=mocks/run_mocks.go -package=mocks
Expand Down
Loading

0 comments on commit 140fbab

Please sign in to comment.