Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
root = true

[{*,.*}]
charset = utf-8
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.sh]
end_of_line = lf

[{*.bat,*.cmd}]
end_of_line = crlf

[*.go]
# gofmt defaults to LF for all the platforms: https://github.com/golang/go/issues/16355
end_of_line = lf

[*.md]
# Trailing whitespace is important in Markdown (they distinguish a new line from a new paragraph)
eclint_indent_style = unset
trim_trailing_whitespace = false

[{go.mod,go.sum,*.go,.gitmodules}]
indent_size = 4
indent_style = tab

[Dockerfile]
indent_size = 4

[*.py]
profile = black

[*.sh]
indent_size = 4
9 changes: 9 additions & 0 deletions .github/linters/.jscpd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"threshold": 2,
"ignore": [
"**/.git/**",
"**/charts/*/templates/*/*.yaml",
"**/charts/*/templates/*/*/*.yaml",
"**/docs/examples/**"
]
}
50 changes: 50 additions & 0 deletions .github/release-drafter-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'


categories:
- title: '💥 Breaking Changes'
labels:
- breaking-change
- title: '💡 New Features'
labels:
- feature
- enhancement
- title: '🐞 Bug Fixes'
labels:
- bug
- fix
- bugfix
- title: '⚙️ Technical Debt'
labels:
- refactor
- title: '📝 Documentation'
labels:
- documentation

change-template: |
- (#$NUMBER) $TITLE by @$AUTHOR

no-changes-template: 'No significant changes'

template: |
## 🚀 Release

### What's Changed
$CHANGES

---

**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION

version-resolver:
major:
labels:
- major
minor:
labels:
- minor
patch:
labels:
- patch
default: patch
43 changes: 43 additions & 0 deletions .github/workflows/automatic-pr-labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---

# The workflow template for automatic PR labeler.
# It requires to have a configuration file with labels and conditions to apply them.
# The configuration file should be placed in the .github folder and named auto-labeler-config.yaml.
# Example file can be found there:
# https://github.com/Netcracker/.github/blob/main/config/examples/auto-labeler-config.yaml

name: Automatic PR Labeler

on:
pull_request:
branches: [main]
types:
[opened, reopened, synchronize]

permissions:
pull-requests: write
contents: read
issues: write

jobs:
assign-labels:
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: "Execute assign labels"
id: action-assign-labels
uses: mauroalderete/action-assign-labels@v1
with:
pull-request-number: ${{ github.event.pull_request.number }}
github-token: ${{ github.token }}
conventional-commits: "./.github/auto-labeler-config.yaml"
maintain-labels-not-matched: true
apply-changes: ${{ github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id }}
- name: "Drop warning if PR from fork"
if: ${{ github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id }}
run: |
echo "⚠️ Pull request from fork! ⚠️" >> $GITHUB_STEP_SUMMARY
echo "Labels will not be applied to PR. Assign them manually please." >> $GITHUB_STEP_SUMMARY
echo "Labels to assign: ${{ steps.action-assign-labels.outputs.labels-next }}" >> $GITHUB_STEP_SUMMARY
24 changes: 24 additions & 0 deletions .github/workflows/pr-collect-commit-messages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---

name: "Add commit messages to PR body"

on:
pull_request:
types: [opened, synchronize]

permissions:
pull-requests: write

jobs:
update-pr-body:
runs-on: ubuntu-latest
steps:
- name: "Update PR body"
if: ${{ github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id }}
uses: netcracker/qubership-workflow-hub/actions/pr-add-messages@main
- name: "Warning"
if: ${{ github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id }}
run: |
echo "⚠️ Pull request from fork! ⚠️" >> $GITHUB_STEP_SUMMARY
echo "Can not change PR body." >> $GITHUB_STEP_SUMMARY

27 changes: 27 additions & 0 deletions .github/workflows/profanity-filter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Profanity filter

on:
issue_comment:
types: [created, edited]
issues:
types: [opened, edited, reopened]
pull_request:
types: [opened, edited, reopened]

permissions:
issues: write
pull-requests: write

jobs:
call-apply-filter:
if: ${{ github.event_name == 'issue_comment' || github.event_name == 'issues' || (github.event_name == 'pull_request' && github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id) }}
uses: Netcracker/qubership-workflow-hub/.github/workflows/profanityFilter.yaml@main
warning:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id }}
steps:
- name: "Warning"
run: |
echo "⚠️ Pull request from fork! ⚠️" >> $GITHUB_STEP_SUMMARY
echo "The action cannot be run over PRs from fork." >> $GITHUB_STEP_SUMMARY