Skip to content

Commit 0429687

Browse files
Merge branch 'camaraproject:main' into main
2 parents 16eb5d8 + c420666 commit 0429687

28 files changed

+1504
-299
lines changed

.github/ISSUE_TEMPLATE/config.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: 🗣 Subproject discussions
4+
url: https://github.com/camaraproject/EdgeCloud/discussions
5+
about: Please ask and answer questions here.
6+
- name: 📖 CAMARA API Design Guidelines
7+
url: https://github.com/camaraproject/Commonalities/blob/main/documentation/API-design-guidelines.md
8+
about: Please refer to the design guidelines.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: ❗ Correction 👣
3+
about: Suggest the correction of an issue in API specification or a misalignment with API design guidelines
4+
title: ''
5+
labels: 'correction'
6+
assignees: ''
7+
8+
---
9+
10+
**Problem description**
11+
<!-- A clear and concise description of what the problem is. -->
12+
13+
**Expected behavior**
14+
<!-- A clear and concise description of what should be changed. -->
15+
16+
17+
**Alternative solution**
18+
<!-- A clear and concise description of any alternative solutions if any. -->
19+
20+
**Additional context**
21+
<!-- Add any other context of the considered correction. -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: ❕ Documentation 📝
3+
about: Indicate an issue with API documentation or supplementary documents
4+
title: ''
5+
labels: 'documentation'
6+
assignees: ''
7+
8+
---
9+
10+
**Problem description**
11+
<!-- A clear and concise description of what the problem is. -->
12+
13+
**Expected action**
14+
<!-- A clear and concise description of what should be done. -->
15+
16+
17+
**Additional context**
18+
<!-- Add any other context of the documentation issue e.g. reference documents. -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: 💡 Enhancement 🌟
3+
about: Suggest an idea for a new API feature or pose a question on directions for API evolution
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
**Problem description**
11+
<!-- A clear and concise description of what the problem is. -->
12+
13+
**Possible evolution**
14+
<!-- A clear and concise description of what can be modified. -->
15+
16+
**Alternative solution**
17+
<!-- A clear and concise description of any alternative solutions or features if any -->
18+
19+
**Additional context**
20+
<!-- Add any other context of the considered enhancement. -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: ☁ Subproject management 🎂
3+
about: Indicate an issue with subproject repository or release management
4+
title: ''
5+
labels: 'subproject management'
6+
assignees: ''
7+
8+
---
9+
10+
**Problem description**
11+
<!-- A clear and concise description of what the problem is. -->
12+
13+
**Expected action**
14+
<!-- A clear and concise description of what should be done. -->
15+
16+
17+
**Additional context**
18+
<!-- Add any other context of the management issue e.g. reference documents. -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: ⁉ Tests 🔎
3+
about: Indicate an issue with API tests
4+
title: ''
5+
labels: 'tests'
6+
assignees: ''
7+
8+
---
9+
10+
**Problem description**
11+
<!-- A clear and concise description of what the problem is. -->
12+
13+
**Expected action**
14+
<!-- A clear and concise description of what should be done. -->
15+
16+
17+
**Additional context**
18+
<!-- Add any other context of the documentation issue e.g. logs, reference documents. -->

.github/pull_request_template.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#### What type of PR is this?
2+
3+
Add one of the following kinds:
4+
* bug
5+
* correction
6+
* enhancement/feature
7+
* cleanup
8+
* documentation
9+
* subproject management
10+
* tests
11+
12+
13+
#### What this PR does / why we need it:
14+
15+
16+
17+
18+
#### Which issue(s) this PR fixes:
19+
20+
<!-- Automatically closes linked issue when PR is merged.
21+
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. -->
22+
23+
Fixes #
24+
25+
#### Special notes for reviewers:
26+
27+
28+
29+
#### Changelog input
30+
31+
```
32+
release-note
33+
34+
```
35+
36+
#### Additional documentation
37+
38+
This section can be blank.
39+
40+
41+
42+
```
43+
docs
44+
45+
```

.github/workflows/megalinter.yml

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
# MegaLinter GitHub Action configuration file
3+
# More info at https://megalinter.io
4+
# CAMARA Project - Github Action for Pull Reqests
5+
# 31.01.2024 - initial version
6+
7+
name: MegaLinter
8+
9+
on: # yamllint disable-line rule:truthy
10+
# Pull Requests to main
11+
pull_request:
12+
branches: [master, main]
13+
14+
env: # Comment env block if you do not want to apply fixes
15+
# Apply linter fixes configuration
16+
APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool)
17+
APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all)
18+
APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request)
19+
20+
concurrency:
21+
group: ${{ github.ref }}-${{ github.workflow }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
build:
26+
name: MegaLinter
27+
runs-on: ubuntu-latest
28+
permissions:
29+
# Give the default GITHUB_TOKEN write permission to commit and push, comment issues & post new PR
30+
# Remove the ones you do not need
31+
contents: write
32+
issues: write
33+
pull-requests: write
34+
steps:
35+
# Git Checkout
36+
- name: Checkout Code
37+
uses: actions/checkout@v4
38+
with:
39+
token: ${{ secrets.GITHUB_TOKEN }}
40+
fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances
41+
- name: Install Spectral
42+
run: npm install -g @stoplight/spectral
43+
- name: Install Spectral functions
44+
run: npm install -g @stoplight/spectral-functions
45+
# - name: Run spectral:oas Spectral Linting
46+
# run: spectral lint code/API_definitions/*.yaml --verbose --ruleset .spectral.yml
47+
# Replace openapi.yaml file with your API specification file
48+
49+
# MegaLinter
50+
- name: MegaLinter
51+
id: ml
52+
# You can override MegaLinter flavor used to have faster performances
53+
# More info at https://megalinter.io/flavors/
54+
uses: oxsecurity/megalinter/flavors/[email protected]
55+
env:
56+
# All available variables are described in documentation
57+
# https://megalinter.io/configuration/
58+
PRINT_ALPACA: false
59+
# VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Validates all source when push on main, else just the git diff with main. Override with true if you always want to lint all sources
60+
VALIDATE_ALL_CODEBASE: true
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
# ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY
63+
DISABLE: COPYPASTE,MARKDOWN
64+
DISABLE_LINTERS: SPELL_CSPELL,SPELL_LYCHEE,YAML_PRETTIER,REPOSITORY_GRYPE, REPOSITORY_SEMGREP,REPOSITORY_DEVSKIM,REPOSITORY_KICS,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,REPOSITORY_CHECKOV,REPOSITORY_GITLEAKS,YAML_V8R,JAVA_PMD,JAVA_CHECKSTYLE
65+
YAML_YAMLLINT_CONFIG_FILE: ".yamllint.yaml"
66+
OPENAPI_SPECTRAL_CONFIG_FILE: ".spectral.yml"
67+
YAML_YAMLLINT_FILTER_REGEX_INCLUDE: "(code/)"
68+
OPENAPI_SPECTRAL_FILTER_REGEX_INCLUDE: "(code/)"
69+
70+
# Upload MegaLinter artifacts
71+
- name: Archive production artifacts
72+
if: ${{ success() }} || ${{ failure() }}
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: MegaLinter reports
76+
path: |
77+
megalinter-reports
78+
mega-linter.log
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
# CAMARA Project - workflow configuration to manually run CAMARA OAS rules
3+
# see https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow
4+
# 31.01.2024 - initial version
5+
6+
name: Spectral manual run
7+
8+
on: workflow_dispatch
9+
10+
concurrency:
11+
group: ${{ github.ref }}-${{ github.workflow }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
name: Spectral linting
17+
runs-on: ubuntu-latest
18+
permissions:
19+
# Give the default GITHUB_TOKEN write permission to commit and push, comment issues & post new PR
20+
# Remove the ones you do not need
21+
contents: write
22+
issues: write
23+
pull-requests: write
24+
steps:
25+
# Git Checkout
26+
- name: Checkout Code
27+
uses: actions/checkout@v4
28+
with:
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances
31+
- name: Install Spectral
32+
run: npm install -g @stoplight/spectral
33+
- name: Install Spectral functions
34+
run: npm install -g @stoplight/spectral-functions
35+
- name: Run Spectral linting
36+
run: spectral lint code/API_definitions/*.yaml --verbose --ruleset .spectral.yml

0 commit comments

Comments
 (0)