Skip to content

Commit d27a566

Browse files
committed
add project boilerplate
0 parents  commit d27a566

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3920
-0
lines changed

.bouncer.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
permit:
2+
- BSD.*
3+
- MIT.*
4+
- Apache.*
5+
- MPL.*
6+
- ISC
7+

.github/ISSUE_TEMPLATE/bug_report.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**What happened**:
11+
12+
**What you expected to happen**:
13+
14+
**How to reproduce it (as minimally and precisely as possible)**:
15+
16+
**Anything else we need to know?**:
17+
18+
**Environment**:
19+
- Output of `version` command:
20+
- OS (e.g: `cat /etc/os-release` or similar):

.github/ISSUE_TEMPLATE/config.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
contact_links:
2+
3+
- name: Join the Slack community 💬
4+
# link to our community Slack registration page
5+
url: https://anchore.com/slack
6+
about: 'Come chat with us! Ask for help, join our software development efforts, or just give us feedback!'
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**What would you like to be added**:
11+
12+
**Why is this needed**:
13+
14+
**Additional context**:
15+
<!-- Add any other context or screenshots about the feature request here. -->

.github/scripts/go-mod-tidy-check.sh

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
set -eu
3+
4+
ORIGINAL_STATE_DIR=$(mktemp -d "TEMP-original-state-XXXXXXXXX")
5+
TIDY_STATE_DIR=$(mktemp -d "TEMP-tidy-state-XXXXXXXXX")
6+
7+
trap "cp -v ${ORIGINAL_STATE_DIR}/* ./ && rm -fR ${ORIGINAL_STATE_DIR} ${TIDY_STATE_DIR}" EXIT
8+
9+
echo "Capturing original state of files..."
10+
cp -v go.mod go.sum "${ORIGINAL_STATE_DIR}"
11+
12+
echo "Capturing state of go.mod and go.sum after running go mod tidy..."
13+
go mod tidy
14+
cp -v go.mod go.sum "${TIDY_STATE_DIR}"
15+
echo ""
16+
17+
set +e
18+
19+
# Detect difference between the git HEAD state and the go mod tidy state
20+
DIFF_MOD=$(diff -u "${ORIGINAL_STATE_DIR}/go.mod" "${TIDY_STATE_DIR}/go.mod")
21+
DIFF_SUM=$(diff -u "${ORIGINAL_STATE_DIR}/go.sum" "${TIDY_STATE_DIR}/go.sum")
22+
23+
if [[ -n "${DIFF_MOD}" || -n "${DIFF_SUM}" ]]; then
24+
echo "go.mod diff:"
25+
echo "${DIFF_MOD}"
26+
echo "go.sum diff:"
27+
echo "${DIFF_SUM}"
28+
echo ""
29+
printf "FAILED! go.mod and/or go.sum are NOT tidy; please run 'go mod tidy'.\n\n"
30+
exit 1
31+
fi

0 commit comments

Comments
 (0)