Skip to content

Commit f9deaf3

Browse files
committed
Add the initial project structure.
1 parent 2b90f24 commit f9deaf3

File tree

16 files changed

+604
-0
lines changed

16 files changed

+604
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/go.sum linguist-generated
2+
/.licenses/ linguist-generated

.github/workflows/ci.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
name: Build
14+
runs-on: ubuntu-20.04
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- name: Setup Go
19+
uses: actions/setup-go@v2
20+
with:
21+
go-version: 1.14.7
22+
- name: Build
23+
uses: goreleaser/goreleaser-action@v2
24+
with:
25+
version: latest
26+
args: --rm-dist --snapshot
27+
28+
test:
29+
name: Test
30+
runs-on: ubuntu-20.04
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v2
34+
- name: Setup Go
35+
uses: actions/setup-go@v2
36+
with:
37+
go-version: 1.14.7
38+
- name: Test
39+
run: go test .
40+
41+
lint:
42+
name: Lint
43+
runs-on: ubuntu-20.04
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v2
47+
- name: Setup Go
48+
uses: actions/setup-go@v2
49+
with:
50+
go-version: 1.14.7
51+
- name: Check Modules
52+
run: |
53+
set -eu
54+
go mod tidy
55+
if [ ! -z "$(git status --porcelain=v1)" ]; then
56+
>&2 echo "Please run \`go mod tidy\` and commit the result."
57+
exit 1
58+
fi
59+
- name: Lint
60+
uses: golangci/golangci-lint-action@v1
61+
with:
62+
version: v1.29
63+
64+
licensedci:
65+
name: Check Licenses
66+
runs-on: ubuntu-20.04
67+
steps:
68+
- name: Checkout
69+
uses: actions/checkout@v2
70+
- name: Setup Go
71+
uses: actions/setup-go@v2
72+
with:
73+
go-version: 1.14.7
74+
- name: Setup licensedci
75+
uses: jonabc/setup-licensed@v1
76+
with:
77+
version: 2.x
78+
- name: Run licensedci
79+
run: licensed status

.github/workflows/codeql.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: 0 0 * * 0
12+
13+
jobs:
14+
analyse:
15+
name: Analyse
16+
runs-on: ubuntu-20.04
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
with:
22+
fetch-depth: 2
23+
- run: git checkout HEAD^2
24+
if: ${{ github.event_name == 'pull_request' }}
25+
- name: Initialize CodeQL
26+
uses: github/codeql-action/init@v1
27+
with:
28+
languages: go
29+
- name: Perform CodeQL Analysis
30+
uses: github/codeql-action/analyze@v1

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "**"
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-20.04
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
- name: Setup Go
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: 1.14.7
21+
- name: Release
22+
uses: goreleaser/goreleaser-action@v2
23+
with:
24+
version: latest
25+
args: release --rm-dist
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/codeql-action-sync
2+
/dist/

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
linters:
2+
disable-all: true
3+
enable:
4+
- goimports

.goreleaser.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
project_name: codeql-action-sync
2+
3+
builds:
4+
- goos: [linux, darwin, windows]
5+
goarch: [386, amd64, arm64]
6+
ldflags:
7+
- -X github.com/github/codeql-action-sync/src.Version={{.Version}}
8+
- -X github.com/github/codeql-action-sync/src.Commit={{.Commit}}

.licensed.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
allowed:
2+
- apache-2.0
3+
- bsd-2-clause
4+
- bsd-3-clause
5+
- mit
6+
- unlicense
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
---
2+
name: github.com/spf13/cobra
3+
version: v1.0.0
4+
type: go
5+
summary: Package cobra is a commander providing a simple interface to create powerful
6+
modern CLI interfaces.
7+
homepage: https://godoc.org/github.com/spf13/cobra
8+
license: apache-2.0
9+
licenses:
10+
- sources: LICENSE.txt
11+
text: |2
12+
Apache License
13+
Version 2.0, January 2004
14+
http://www.apache.org/licenses/
15+
16+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
17+
18+
1. Definitions.
19+
20+
"License" shall mean the terms and conditions for use, reproduction,
21+
and distribution as defined by Sections 1 through 9 of this document.
22+
23+
"Licensor" shall mean the copyright owner or entity authorized by
24+
the copyright owner that is granting the License.
25+
26+
"Legal Entity" shall mean the union of the acting entity and all
27+
other entities that control, are controlled by, or are under common
28+
control with that entity. For the purposes of this definition,
29+
"control" means (i) the power, direct or indirect, to cause the
30+
direction or management of such entity, whether by contract or
31+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
32+
outstanding shares, or (iii) beneficial ownership of such entity.
33+
34+
"You" (or "Your") shall mean an individual or Legal Entity
35+
exercising permissions granted by this License.
36+
37+
"Source" form shall mean the preferred form for making modifications,
38+
including but not limited to software source code, documentation
39+
source, and configuration files.
40+
41+
"Object" form shall mean any form resulting from mechanical
42+
transformation or translation of a Source form, including but
43+
not limited to compiled object code, generated documentation,
44+
and conversions to other media types.
45+
46+
"Work" shall mean the work of authorship, whether in Source or
47+
Object form, made available under the License, as indicated by a
48+
copyright notice that is included in or attached to the work
49+
(an example is provided in the Appendix below).
50+
51+
"Derivative Works" shall mean any work, whether in Source or Object
52+
form, that is based on (or derived from) the Work and for which the
53+
editorial revisions, annotations, elaborations, or other modifications
54+
represent, as a whole, an original work of authorship. For the purposes
55+
of this License, Derivative Works shall not include works that remain
56+
separable from, or merely link (or bind by name) to the interfaces of,
57+
the Work and Derivative Works thereof.
58+
59+
"Contribution" shall mean any work of authorship, including
60+
the original version of the Work and any modifications or additions
61+
to that Work or Derivative Works thereof, that is intentionally
62+
submitted to Licensor for inclusion in the Work by the copyright owner
63+
or by an individual or Legal Entity authorized to submit on behalf of
64+
the copyright owner. For the purposes of this definition, "submitted"
65+
means any form of electronic, verbal, or written communication sent
66+
to the Licensor or its representatives, including but not limited to
67+
communication on electronic mailing lists, source code control systems,
68+
and issue tracking systems that are managed by, or on behalf of, the
69+
Licensor for the purpose of discussing and improving the Work, but
70+
excluding communication that is conspicuously marked or otherwise
71+
designated in writing by the copyright owner as "Not a Contribution."
72+
73+
"Contributor" shall mean Licensor and any individual or Legal Entity
74+
on behalf of whom a Contribution has been received by Licensor and
75+
subsequently incorporated within the Work.
76+
77+
2. Grant of Copyright License. Subject to the terms and conditions of
78+
this License, each Contributor hereby grants to You a perpetual,
79+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
80+
copyright license to reproduce, prepare Derivative Works of,
81+
publicly display, publicly perform, sublicense, and distribute the
82+
Work and such Derivative Works in Source or Object form.
83+
84+
3. Grant of Patent License. Subject to the terms and conditions of
85+
this License, each Contributor hereby grants to You a perpetual,
86+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
87+
(except as stated in this section) patent license to make, have made,
88+
use, offer to sell, sell, import, and otherwise transfer the Work,
89+
where such license applies only to those patent claims licensable
90+
by such Contributor that are necessarily infringed by their
91+
Contribution(s) alone or by combination of their Contribution(s)
92+
with the Work to which such Contribution(s) was submitted. If You
93+
institute patent litigation against any entity (including a
94+
cross-claim or counterclaim in a lawsuit) alleging that the Work
95+
or a Contribution incorporated within the Work constitutes direct
96+
or contributory patent infringement, then any patent licenses
97+
granted to You under this License for that Work shall terminate
98+
as of the date such litigation is filed.
99+
100+
4. Redistribution. You may reproduce and distribute copies of the
101+
Work or Derivative Works thereof in any medium, with or without
102+
modifications, and in Source or Object form, provided that You
103+
meet the following conditions:
104+
105+
(a) You must give any other recipients of the Work or
106+
Derivative Works a copy of this License; and
107+
108+
(b) You must cause any modified files to carry prominent notices
109+
stating that You changed the files; and
110+
111+
(c) You must retain, in the Source form of any Derivative Works
112+
that You distribute, all copyright, patent, trademark, and
113+
attribution notices from the Source form of the Work,
114+
excluding those notices that do not pertain to any part of
115+
the Derivative Works; and
116+
117+
(d) If the Work includes a "NOTICE" text file as part of its
118+
distribution, then any Derivative Works that You distribute must
119+
include a readable copy of the attribution notices contained
120+
within such NOTICE file, excluding those notices that do not
121+
pertain to any part of the Derivative Works, in at least one
122+
of the following places: within a NOTICE text file distributed
123+
as part of the Derivative Works; within the Source form or
124+
documentation, if provided along with the Derivative Works; or,
125+
within a display generated by the Derivative Works, if and
126+
wherever such third-party notices normally appear. The contents
127+
of the NOTICE file are for informational purposes only and
128+
do not modify the License. You may add Your own attribution
129+
notices within Derivative Works that You distribute, alongside
130+
or as an addendum to the NOTICE text from the Work, provided
131+
that such additional attribution notices cannot be construed
132+
as modifying the License.
133+
134+
You may add Your own copyright statement to Your modifications and
135+
may provide additional or different license terms and conditions
136+
for use, reproduction, or distribution of Your modifications, or
137+
for any such Derivative Works as a whole, provided Your use,
138+
reproduction, and distribution of the Work otherwise complies with
139+
the conditions stated in this License.
140+
141+
5. Submission of Contributions. Unless You explicitly state otherwise,
142+
any Contribution intentionally submitted for inclusion in the Work
143+
by You to the Licensor shall be under the terms and conditions of
144+
this License, without any additional terms or conditions.
145+
Notwithstanding the above, nothing herein shall supersede or modify
146+
the terms of any separate license agreement you may have executed
147+
with Licensor regarding such Contributions.
148+
149+
6. Trademarks. This License does not grant permission to use the trade
150+
names, trademarks, service marks, or product names of the Licensor,
151+
except as required for reasonable and customary use in describing the
152+
origin of the Work and reproducing the content of the NOTICE file.
153+
154+
7. Disclaimer of Warranty. Unless required by applicable law or
155+
agreed to in writing, Licensor provides the Work (and each
156+
Contributor provides its Contributions) on an "AS IS" BASIS,
157+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
158+
implied, including, without limitation, any warranties or conditions
159+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
160+
PARTICULAR PURPOSE. You are solely responsible for determining the
161+
appropriateness of using or redistributing the Work and assume any
162+
risks associated with Your exercise of permissions under this License.
163+
164+
8. Limitation of Liability. In no event and under no legal theory,
165+
whether in tort (including negligence), contract, or otherwise,
166+
unless required by applicable law (such as deliberate and grossly
167+
negligent acts) or agreed to in writing, shall any Contributor be
168+
liable to You for damages, including any direct, indirect, special,
169+
incidental, or consequential damages of any character arising as a
170+
result of this License or out of the use or inability to use the
171+
Work (including but not limited to damages for loss of goodwill,
172+
work stoppage, computer failure or malfunction, or any and all
173+
other commercial damages or losses), even if such Contributor
174+
has been advised of the possibility of such damages.
175+
176+
9. Accepting Warranty or Additional Liability. While redistributing
177+
the Work or Derivative Works thereof, You may choose to offer,
178+
and charge a fee for, acceptance of support, warranty, indemnity,
179+
or other liability obligations and/or rights consistent with this
180+
License. However, in accepting such obligations, You may act only
181+
on Your own behalf and on Your sole responsibility, not on behalf
182+
of any other Contributor, and only if You agree to indemnify,
183+
defend, and hold each Contributor harmless for any liability
184+
incurred by, or claims asserted against, such Contributor by reason
185+
of your accepting any such warranty or additional liability.
186+
- sources: README.md
187+
text: Cobra is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/spf13/cobra/blob/master/LICENSE.txt)
188+
notices: []
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: github.com/spf13/pflag
3+
version: v1.0.3
4+
type: go
5+
summary: Package pflag is a drop-in replacement for Go's flag package, implementing
6+
POSIX/GNU-style --flags.
7+
homepage: https://godoc.org/github.com/spf13/pflag
8+
license: bsd-3-clause
9+
licenses:
10+
- sources: LICENSE
11+
text: |
12+
Copyright (c) 2012 Alex Ogier. All rights reserved.
13+
Copyright (c) 2012 The Go Authors. All rights reserved.
14+
15+
Redistribution and use in source and binary forms, with or without
16+
modification, are permitted provided that the following conditions are
17+
met:
18+
19+
* Redistributions of source code must retain the above copyright
20+
notice, this list of conditions and the following disclaimer.
21+
* Redistributions in binary form must reproduce the above
22+
copyright notice, this list of conditions and the following disclaimer
23+
in the documentation and/or other materials provided with the
24+
distribution.
25+
* Neither the name of Google Inc. nor the names of its
26+
contributors may be used to endorse or promote products derived from
27+
this software without specific prior written permission.
28+
29+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40+
notices: []

0 commit comments

Comments
 (0)