Skip to content

Commit

Permalink
chore: add initial configs / workflows / templates for the repository (
Browse files Browse the repository at this point in the history
…#2)

# Description

Prepares the repository with all initial configs, workflows & templates.

# Verification

Compare with configs from
[Repository-Templates](https://github.com/Hapag-Lloyd/Repository-Templates)
`default` directory

# Checklist

- [x] My code follows the style guidelines of the project
- [x] I have performed a self-review of my own code
- [x] I have made corresponding changes to the documentation
  • Loading branch information
PascalFrenz committed Apr 8, 2024
1 parent 8ff7b87 commit 4641ce5
Show file tree
Hide file tree
Showing 24 changed files with 6,620 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .config/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"version": "0.2",
"language": "en",
"words": [
"cpus",
"Hapag",
"Infracost",
"oidc",
"Repology",
"tflint",
"tfsec"
],
"ignoreWords": [
"Buildx",
"DOCKERHUB",
"amannn",
"aquasecurity",
"automerge",
"automerged",
"buildcache",
"buildx",
"codeowners",
"codeql",
"conventionalcommits",
"datasource",
"dorny",
"firelens",
"fluentbit",
"hadolint",
"healthcheck",
"hlag",
"hmarr",
"ibiqlik",
"kayman",
"ludeeus",
"markdownlint",
"mktemp",
"ossrh",
"pascalfrenz",
"rhysd",
"ruleset",
"sarif",
"shellcheck",
"shuf",
"shunsuke",
"signoff",
"vuln"
]
}
12 changes: 12 additions & 0 deletions .config/markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# Default state for all rules
default: true

# MD013/line-length - Line length
MD013:
# Number of characters
line_length: 190 # higher than usual to account for long links
# Number of characters for headings
heading_line_length: 132
# Number of characters for code blocks
code_block_line_length: 132
8 changes: 8 additions & 0 deletions .config/yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
extends: default

rules:
line-length:
max: 132
comments:
min-spaces-from-content: 1 # Renovate uses 1 space only
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* @hapag-lloyd/quotation-and-contract-management

# license file shouldn't be changed and needs to be reviewed by lawyers
LICENSE @hapag-lloyd/organization-defaults
25 changes: 25 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Contribution guide

We appreciate your thought to contribute to open source. :heart: We want to make contributing as easy as possible. You are welcome to:

- Report a bug
- Discuss the current state of the code
- Submit a fix
- Propose new features

We use [Github Flow](https://guides.github.com/introduction/flow/index.html), so all code changes happen through pull
requests. We actively welcome your pull requests:

1. Fork the repo and create your branch from `main`.
2. If you've added code, check one of the examples.
3. Make sure your code lints.
4. Raise a pull request.

## Documentation

We use [pre-commit](https://pre-commit.com/) for some default checks which are fast and find the most common errors.

## License

By contributing, you agree that your contributions will be licensed under the license available at
[LICENSE](blob/main/LICENSE).
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Found a bug? Report it!
title: ''
labels: new, bug
assignees: ''
---

<!-- Before submitting a bug, make sure that you meet the following requirements:
1. use the latest version of the module
2. read the documentation
-->

# Describe the bug

A clear and concise description of what the bug is.

# To Reproduce

Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

# Expected behavior

A clear and concise description of what you expected to happen.

# Additional context

Add any other context about the problem here.
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Feature Request
about: Propose a new feature
title: ''
labels: new, enhancement
assignees: ''
---

# Describe the solution you'd like

<!--
Provide a clear and concise description of what you want to happen. Add some sentences to describe the use case
to be solved by this feature.
-->

# Describe alternatives you've considered

<!--
Let us know about other solutions you've tried or researched.
-->

# Suggest a solution

<!--
Things to include:
- details of the technical implementation
- tradeoffs made in design decisions
-caveats and considerations for the future
If there are multiple solutions, please present each one separately. Save comparisons for the very end.
-->

# Additional context

<!--
Is there anything else you can add about the proposal?
You might want to link to related issues here, if you haven't already.
-->
21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Description

What is the overall goal of your PR? Which problem does it solve? Please also include relevant motivation and context.
List any dependencies that are required for this change.

Fixes #(issue number)

# Migrations required

yes: please describe the migration
no: please delete the whole paragraph

# Verification

Please describe the test cases you used to verify your code. Did you check the change in your environment?

# Checklist

- [ ] My code follows the style guidelines of the project
- [ ] I have performed a self-review of my own code
- [ ] I have made corresponding changes to the documentation
4 changes: 4 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
extends: ["github>Hapag-Lloyd/Renovate-Global-Configuration"]
}
11 changes: 11 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Lint files

# yamllint disable-line rule:truthy
on:
pull_request:

jobs:
default:
uses: Hapag-Lloyd/Repository-Templates/.github/workflows/default_linter_callable.yml@e87de55f19cc1e069426c42120094e7e2446dad4
secrets: inherit
18 changes: 18 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: "Pull Request"

# yamllint disable-line rule:truthy
on:
pull_request_target:
types:
- opened
- edited
- synchronize
branches-ignore:
- "release-please--branches--*"

jobs:
default:
# yamllint disable-line rule:line-length
uses: Hapag-Lloyd/Repository-Templates/.github/workflows/default_pull_request_callable.yml@e87de55f19cc1e069426c42120094e7e2446dad4
secrets: inherit
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Create a release

# yamllint disable-line rule:truthy
on:
push:
branches:
- main

jobs:
default:
uses: Hapag-Lloyd/Repository-Templates/.github/workflows/default_release_callable.yml@e87de55f19cc1e069426c42120094e7e2446dad4
secrets: inherit
14 changes: 14 additions & 0 deletions .github/workflows/release_dry_run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Try a release

# yamllint disable-line rule:truthy
on:
push:
branches:
- release-dry-run

jobs:
default:
# yamllint disable-line rule:line-length
uses: Hapag-Lloyd/Repository-Templates/.github/workflows/default_release_dry_run_callable.yml@e87de55f19cc1e069426c42120094e7e2446dad4
secrets: inherit
11 changes: 11 additions & 0 deletions .github/workflows/renovate_auto_approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Approve all Renovate PRs automatically

# yamllint disable-line rule:truthy
on: pull_request_target

jobs:
default:
# yamllint disable-line rule:line-length
uses: Hapag-Lloyd/Repository-Templates/.github/workflows/default_renovate_auto_approve_callable.yml@e87de55f19cc1e069426c42120094e7e2446dad4
secrets: inherit
14 changes: 14 additions & 0 deletions .github/workflows/slash_ops_command_help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Execute ChatOps command

# yamllint disable-line rule:truthy
on:
repository_dispatch:
types:
- help-command

jobs:
default:
# yamllint disable-line rule:line-length
uses: Hapag-Lloyd/Repository-Templates/.github/workflows/default_slash_ops_command_help_callable.yml@e87de55f19cc1e069426c42120094e7e2446dad4
secrets: inherit
14 changes: 14 additions & 0 deletions .github/workflows/slash_ops_comment_dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: PR commented

# yamllint disable-line rule:truthy
on:
issue_comment:
types:
- created

jobs:
default:
# yamllint disable-line rule:line-length
uses: Hapag-Lloyd/Repository-Templates/.github/workflows/default_slash_ops_comment_dispatch_callable.yml@e87de55f19cc1e069426c42120094e7e2446dad4
secrets: inherit
11 changes: 11 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: "Check spelling"

# yamllint disable-line rule:truthy
on:
pull_request:

jobs:
default:
uses: Hapag-Lloyd/Repository-Templates/.github/workflows/default_spelling_callable.yml@e87de55f19cc1e069426c42120094e7e2446dad4
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: "Close stale issues and PRs"

# yamllint disable-line rule:truthy
on:
schedule:
- cron: "25 2 * * *"

jobs:
default:
uses: Hapag-Lloyd/Repository-Templates/.github/workflows/default_stale_callable.yml@e87de55f19cc1e069426c42120094e7e2446dad4
secrets: inherit
14 changes: 14 additions & 0 deletions .github/workflows/welcome_message.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: PR opened

# yamllint disable-line rule:truthy
on:
pull_request_target:
types:
- opened

jobs:
default:
# yamllint disable-line rule:line-length
uses: Hapag-Lloyd/Repository-Templates/.github/workflows/default_welcome_message_callable.yml@e87de55f19cc1e069426c42120094e7e2446dad4
secrets: inherit
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
**/node_modules
Loading

0 comments on commit 4641ce5

Please sign in to comment.