[COMPLIANCE] Add copyright and license headers (#327)

* add copywrite changes

* extra slash

* [COMPLIANCE] Add copyright and license headers

* removed incorrect license

* reverted /dist

* add action.yml to copywrite ignore

* revert

* remove dist changes

* revert dist
This commit is contained in:
Austin Valle 2023-06-05 11:20:41 -04:00 committed by GitHub
parent 1fdd4cd311
commit 5aa9444145
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 115 additions and 28 deletions

30
.copywrite.hcl Normal file
View file

@ -0,0 +1,30 @@
schema_version = 1
project {
license = "MPL-2.0"
copyright_year = 2020
header_ignore = [
# changie tooling configuration and CHANGELOG entries (prose)
".changes/unreleased/*.yaml",
".changie.yaml",
# GitHub issue template configuration
".github/ISSUE_TEMPLATE/*.yml",
# GitHub Actions workflow-specific configurations
".github/labeler-*.yml",
# Github Action linting configuration
".github/actionlint.yaml",
# Release Engineering tooling configuration
".release/*.hcl",
# Auto-generated /dist
"dist/**",
# GitHub Action metadata file
"action.yml",
]
}

17
.github/workflows/compliance.yml vendored Normal file
View file

@ -0,0 +1,17 @@
name: compliance
on:
pull_request:
permissions:
contents: read
jobs:
# Reference: ENGSRV-059
copywrite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: hashicorp/setup-copywrite@867a1a2a064a0626db322392806428f7dc59cb3e # v1.1.2
- run: copywrite headers --plan
- run: copywrite license --plan

28
NOTICE
View file

@ -1,28 +0,0 @@
# Notice
This project includes code under the following license(s):
```
MIT License
Copyright (c) 2020 GitHub, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

View file

@ -275,3 +275,11 @@ to `true`, the following outputs are available for subsequent steps that call th
## Experimental Status
By using the software in this repository (the "Software"), you acknowledge that: (1) the Software is still in development, may change, and has not been released as a commercial product by HashiCorp and is not currently supported in any way by HashiCorp; (2) the Software is provided on an "as-is" basis, and may include bugs, errors, or other issues; (3) the Software is NOT INTENDED FOR PRODUCTION USE, use of the Software may result in unexpected results, loss of data, or other unexpected results, and HashiCorp disclaims any and all liability resulting from use of the Software; and (4) HashiCorp reserves all rights to make all decisions about the features, functionality and commercial release (or non-release) of the Software, at any time and without any obligation or liability whatsoever.
## Contributing
### License Headers
All source code files (excluding autogenerated files like `package.json`, prose, and files excluded in [.copywrite.hcl](.copywrite.hcl)) must have a license header at the top.
This can be autogenerated by installing the HashiCorp [`copywrite`](https://github.com/hashicorp/copywrite#getting-started) tool and running `copywrite headers` in the root of the repository.

10
dist/index.js vendored
View file

@ -4,6 +4,11 @@
/***/ 3117:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
// Node.js core
const fs = (__nccwpck_require__(7147).promises);
const os = __nccwpck_require__(2037);
@ -21835,6 +21840,11 @@ module.exports = require("zlib");
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
const core = __nccwpck_require__(2186);
const setup = __nccwpck_require__(3117);

15
dist/index1.js vendored
View file

@ -3923,6 +3923,11 @@ exports.debug = debug; // for test
/***/ 320:
/***/ ((module) => {
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
/**
* Acts as a listener for @actions/exec, by capturing STDOUT and STDERR
* streams, and exposing them via a contents attribute.
@ -3966,6 +3971,11 @@ module.exports = OutputListener;
/***/ 650:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
const os = __nccwpck_require__(37);
const path = __nccwpck_require__(17);
@ -4132,6 +4142,11 @@ module.exports = require("util");
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
const io = __nccwpck_require__(351);
const core = __nccwpck_require__(186);
const { exec } = __nccwpck_require__(514);

View file

@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
const core = require('@actions/core');
const setup = require('./lib/setup-terraform');

View file

@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
// Node.js core
const fs = require('fs').promises;
const os = require('os');

View file

@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
// Mock external modules by default
jest.mock('@actions/core');
jest.mock('@actions/tool-cache');

View file

@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
/**
* Acts as a listener for @actions/exec, by capturing STDOUT and STDERR
* streams, and exposing them via a contents attribute.

View file

@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
const os = require('os');
const path = require('path');

View file

@ -1,4 +1,9 @@
#!/usr/bin/env node
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
const io = require('@actions/io');
const core = require('@actions/core');
const { exec } = require('@actions/exec');

View file

@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
const OutputListener = require('../lib/output-listener');
describe('output-listener', () => {