Skip to content

Commit fd52060

Browse files
public repo template 1.0.0 version
* first version of the public template * added ISSUE templates and fix typos * Update CONTRIBUTING.md Signed-off-by: Ziegler András <[email protected]> * Update README.md Signed-off-by: Ziegler András <[email protected]> * Update README.md Signed-off-by: Ziegler András <[email protected]> * fixed findings broken readme links, removed .md from contributing, moved pr template * put the md suffix everywhere --------- Signed-off-by: Ziegler András <[email protected]>
1 parent 37063e3 commit fd52060

File tree

9 files changed

+156
-144
lines changed

9 files changed

+156
-144
lines changed

.github/CONTRIBUTING.md

Lines changed: 110 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,135 @@
1-
# Contributing Guideline - Internal Repository
1+
# Contributing Guideline
2+
As an open-source project, we welcome and encourage the community to submit patches directly to the project.
3+
In our collaborative open-source environment, standards and methods for submitting changes help reduce
4+
the chaos that can result from an active development community.
5+
6+
This document explains how to participate in project conversations, log bugs and enhancement requests,
7+
and submit patches to the project so your patch will be accepted quickly into the codebase.
8+
9+
## Prerequisites
10+
You should be familiar with Git and GitHub. [Getting started](https://docs.github.com/en/get-started)
11+
If you haven't already done so, you'll need to create a (free) GitHub account at https://github.com
12+
and have Git tools available on your development system. You also need to add your email address to your account.
13+
14+
As a contributor, you'll want to be familiar with the Silicon Labs tooling:
15+
- [Simplicity Studio](https://docs.silabs.com/simplicity-studio-5-users-guide/latest/ss-5-users-guide-overview/)
16+
- [Platform](https://docs.silabs.com/gecko-platform/latest/platform-overview/)
17+
- [Simplicity Commander](https://docs.silabs.com/simplicity-commander/latest/simplicity-commander-start/)
18+
19+
Read the Silicon Labs [coding guidelines](https://github.com/SiliconLabsSoftware/agreements-and-guidelines/blob/main/coding_standard.md).
20+
## Git Setup
21+
We need to know who you are, and how to contact you. Please ass the following information to your Git installation:
22+
```
23+
git config --global user.name "FirstName LastName"
24+
git config --global user.email "[email protected]"
25+
```
26+
set the Git configuration variables user.name to your full name, and user.email to your email address.
27+
The user.name must be your full name (first and last at minimum), not a pseudonym or hacker handle.
28+
The email address that you use in your Git configuration must match the email address you use to sign your commits.
29+
30+
If you intend to edit commits using the Github.com UI, ensure that your github profile email address and profile name also match those used in your git configuration
31+
(user.name & user.email).
232

3-
## Branch Naming Convention
33+
### Set up GitHub commit signature
434

5-
Refer to the Developer Services Branching Policy and Git User [Guide](https://confluence.silabs.com/pages/viewpage.action?pageId=315870645).
35+
**command line setup**
636

7-
Use lowercase letters and hyphens (`-`) as delimiters.
8-
Google search treats a hyphen as a word separator, which helps improve the visibility of public repositories.
9-
We should structure our internal repository as if it were a public one.
37+
The repository requires signed off commits. Follow this [guide](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) how to set it up.
38+
1. Generate a gpg key [howto](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key)
39+
2. Configure your local repository with the gpg key. [guide]whttps://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key)
40+
3. Configure your GitHub account with the gpg key [guide](https://docs.github.com/en/authentication/managing-commit-signature-verification/associating-an-email-with-your-gpg-key)
1041

11-
Branch name should be short and clear. If possible it can be the JIRA ticket name.
12-
Also it is recommended to include the JIRA ticket number.
13-
Example:
42+
**Command line steps:**
43+
Use the git-bash and navigate into your local repo.
44+
1. disable all the gpg signature globally. (Optional)
45+
```
46+
$ git config --global --unset gpg.format
47+
```
48+
2. Create a gpg-key
49+
```
50+
$ gpg --full-generate-key
51+
```
52+
3. Configure the local repo with your new key.
53+
```
54+
$ gpg --list-secret-keys --keyid-format=long
55+
gpg: checking the trustdb
56+
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
57+
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
58+
/c/Users/silabsuser/.gnupg/pubring.kbx
59+
------------------------------------
60+
sec rsa3072/1234567891234567 2025-04-09 [SC]
61+
ABDGDGFDGFDGDHHSRGRG12345667912345678981
62+
uid [ultimate] Firstname Lastname <[email protected]>
63+
ssb rsa3072/11098765432110981 2025-04-09 [E]
64+
65+
$ git config user.signingkey 1234567891234567
66+
```
67+
4. Force every commit to be signed
68+
```
69+
$ git config commit.gpgsign true
70+
```
71+
5. Export your gpg key
1472
```
15-
IOT_DS-123-update-sdk-version
73+
$ gpg --armor --export 888BA795B7085898
1674
```
75+
Make sure your email address is verified by GitHub before committing anything.
1776

18-
## Commit Message Format
77+
## Licensing
78+
Please check the [Licensing.md](../LICENSE.md) for more details.
1979

20-
We use [smart commits](https://support.atlassian.com/bitbucket-cloud/docs/use-smart-commits/) to sync GitHub commits with our JIRA server.
21-
This requires the JIRA ticket number in the commit message.
22-
The first line is the commit message, and the next lines provide the description.
23-
The commit message should be short and clear, and it must contain the JIRA ticket number.
24-
You can add more details in the description.
80+
## Contributor License Agreement
81+
When a project receives a contribution, it must be clear that the contributor has the rights to contribute the content and that the project then has the rights to use and otherwise operate with the content (e.g., relicense or distribute). A Contributor License Agreement (CLA) is a legal document establishing these rights and defining the terms under which a license is granted by a contributor to an open-source project. A CLA clarifies that any contribution was authorized (not contributing someone else’s code without permission or without legal authority to contribute) and protects the project from potential future legal challenges.
2582

26-
**Command Line:**
27-
```
28-
git commit -m "IOT_DS-1234 initial version of SDK 4.4.3 is committed" -m "Not final version. Several compiler warnings need to be addressed."
29-
```
83+
Please check Silicon Labs [CLA document](https://github.com/SiliconLabsSoftware/agreements-and-guidelines/blob/main/contributor_license_agreement.md).
84+
During the pull request review, every new contributor must sign the CLA document. It can be signed as an individual or on behalf of a company.
85+
Signatures have a 6-month expiration period.
3086

31-
**VS Code:**
32-
The first line is the commit message, and the next lines are the commit description.
87+
## Contribution process
88+
### Creating an Issue
89+
Please follow the official GitHub [guide](https://opensource.guide/how-to-contribute/#opening-an-issue).
3390

34-
## Pull Request Guideline
91+
### Fork the repository
92+
When you created an issue and based on the discussion you want to contribute with your source-code.
93+
Branching is disabled on the public Silicon Labs repositories. You need to fork your own repo first.
94+
Please follow the official GitHub [guide](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project).
95+
You can create your branch on your own forked repo now.
3596

36-
Refer to the general pull request [guideline](https://opensource.guide/how-to-contribute/#opening-a-pull-request) from GitHub.
97+
### Branch Naming Convention
98+
Branch naming shall follow the following template: *IssueNumber-issue-title-goes-here*
99+
Example branch name:
100+
```
101+
99-bootloader-implementation
102+
```
103+
Issue number is necessary to maintain tracebility.
104+
Now you have a branch. You can start committing your code onto it.
37105

38-
### As a Developer
106+
## Commit Messages
39107

40-
What to consider when raising a Pull Request:
108+
Silicon Labs repositories require signed-off commits.
109+
Every commit represents a change inside the repository. Every change needs to be documented extensively.
110+
```
111+
Issuenumber-summary-of-changes
41112
42-
1. **Pull Request Naming**
43-
By default, GitHub uses the branch name as the pull request title. If the branch naming guideline was followed, no changes are needed here.
113+
Detailed description what was implemented.
114+
Another line of really good description
115+
```
44116

45-
2. **Check the Reviewer List**
117+
## Pull Request Guideline
118+
Okay you finished your work committed all your changes to your branch. Time to create a pull request.
119+
Refer to the general pull request [guideline](https://opensource.guide/how-to-contribute/#opening-a-pull-request) from GitHub.
120+
What to consider when raising a Pull Request:
121+
1. **Pull Request Naming**
122+
By default, GitHub uses the branch name as the pull request title. If the branch naming convention was followed, no changes are needed here.
123+
2. **Create Description**
124+
Fill out the pull request template.
125+
3. **Check the Reviewer List**
46126
GitHub assigns reviewers based on the [CODEOWNERS](CODEOWNERS) file.
47127
Add more reviewers if needed. Do not remove reviewers from the PR. Ask the repository owner for updates to the code owners.
48-
49-
3. **Evaluate the Action Workflow Results**
128+
4. **Evaluate the Action Workflow Results**
50129
The following workflows are included in every repository:
51130
- **[Coding Convention Check](workflows/00-Check-Code-Convention.yml)**: Analyzes the code formatting and fails if any rules are broken.
52131
- **[Firmware Build](workflows/02-Build-Firmware.yml)**: Builds the firmware inside the [Dockerfile](../Dockerfile).
53132
- **[Secret Scanner](workflows/04-TruffleHog-Security-Scan.yml)**: Runs the TruffleHog security scanner to look for API keys and committed secrets.
54-
- **[SonarQube Analysis](workflows/zz-sonarqube-analysis.yml)**: Runs SonarQube analysis on the project. Refer to the related [Confluence page](https://confluence.silabs.com/display/IoTApps/SQA+-+SonarQube+howTo).
55133

56134
### As a Reviewer
57135

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Description
2+
<!-- Provide a brief description of the changes in this pull request. -->
3+
4+
## Related Issue
5+
<!-- If this pull request addresses an issue, link to it here. -->
6+
Closes #<issue_number>
7+
8+
## Changes Made
9+
<!-- List the changes made in this pull request. -->
10+
-
11+
12+
## Checklist
13+
- [ ] I have read the [Contributor License Agreement](https://github.com/SiliconLabsSoftware/agreements-and-guidelines/blob/main/contributor_license_agreement.md).
14+
- [ ] I have followed the repository's [coding guidelines](https://github.com/SiliconLabsSoftware/agreements-and-guidelines/blob/main/coding_standard.md) .
15+
- [ ] I have checked the action workflow results and they are all passed.
16+
17+
## Screenshots (if applicable)
18+
<!-- Add screenshots to help explain the changes (if applicable). -->
19+
20+
## Additional Notes
21+
<!-- Add any additional information or context. -->

.github/sonar-project.properties

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/01-CLA-Assistant.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
name: 01-CLA-Assistant
2-
## This workflow is used only for public repositories
3-
## uncomment the other trigger conditions for public repositories
2+
## This workflow is used to check the CLA validation for the pull requests.concurrency:
3+
## Source: https://github.com/SiliconLabsSoftware/action-cla-assistant/tree/silabs_flavour_v2
44

55
on:
6-
workflow_dispatch:
7-
# issue_comment:
8-
# types: [created]
9-
# pull_request_target:
10-
# types: [opened,closed,synchronize,reopened]
6+
issue_comment:
7+
types: [created]
8+
pull_request_target:
9+
types: [opened,closed,synchronize,reopened]
1110

1211
# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
1312
permissions:
@@ -18,19 +17,19 @@ permissions:
1817

1918
jobs:
2019
CLAAssistant:
21-
runs-on: ubuntu-24.04
20+
runs-on: ubuntu-latest
2221
steps:
2322
- name: "CLA Assistant"
2423
if: ${{ contains(github.event.comment.body, 'I have read the CLA Document and I hereby sign the CLA') }} || github.event_name == 'pull_request_target'
25-
uses: SiliconLabsWorkflows/cla-assistant@silabs_flavour_v2
24+
uses: SiliconLabsSoftware/action-cla-assistant@silabs_flavour_v2
2625
env:
2726
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2827
# the below token should have repo scope and must be manually added by you in the repository's secret
2928
# This token is required only if you have configured to store the signatures in a remote repository/organization
3029
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
3130
with:
3231
path-to-signatures: "cla_signatures_db.json"
33-
path-to-document: "https://github.com/SiliconLabsSoftware/bluetooth-AoA-example/blob/main/cla.md"
32+
path-to-document: "https://github.com/SiliconLabsSoftware/agreements-and-guidelines/blob/main/contributor_license_agreement.md"
3433
# branch should not be protected
3534
branch: 'cla-database'
3635
allowlist: silabs-*,bot*

.github/workflows/02-Build-Firmware.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
name: 02-Build-Firmware
2-
## By default this workflow runs on Github hosted runners. This is not free for internal and private repositories
3-
## It is recommended to run this job on a self-hosted runner for non public repository
4-
## Uncomment the needed runs-on command.
2+
53
on:
64
pull_request:
75
branches:
@@ -15,9 +13,7 @@ on:
1513

1614
jobs:
1715
FW_build:
18-
# Choose a runner type here by commenting out the not needed one.
1916
runs-on: ubuntu-24.04
20-
#runs-on: devs-self-hosted-runner
2117
steps:
2218
- name: Checkout code
2319
uses: actions/checkout@v4

.github/workflows/zz-sonarqube-analysis.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,3 @@
3030
*.xlsx
3131
*.xls
3232
*.html
33-
34-
35-
36-
#code convention tool gitignore
37-
code-convention-tool/
38-
**/venv/

CLA.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Silicon Labs Contributor License Agreement
2+
Follow the link for the official Silicon Labs [Contributor License Agreement](https://github.com/SiliconLabsSoftware/agreements-and-guidelines/blob/main/contributor_license_agreement.md).

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Developer Services template project
2-
** TODO **Put project introduction here. 1-2 sentence about the project.
2+
** TODO ** Put project introduction here. 1-2 sentence about the project.
33
## How to use the template
4-
1. Create your sw projects under "projects/" folder.
5-
2. Check .gitignore file and modify it if it is necessary
6-
3. Check the [./Dockerfile](./Dockerfile) and extend it if necessary
7-
4. Make sure that the whole project can be compiled with a single "make all" command.
4+
1. Import the [basic ruleset](https://github.com/SiliconLabsSoftware/devs-template/blob/main/.github/rulesets/Silabs-basic-public-ruleset.json). Follow the official GitHub [guide](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#importing-a-ruleset).
5+
2. Update if necessary the [issue_templates](.github/ISSUE_TEMPLATE/) and the [pull request template](./.github/PULL_REQUEST_TEMPLATE.md)
6+
3. Create your sw projects under [projects/](projects/) folder.
7+
4. Check [.gitignore](.gitignore) file and modify it if it is necessary
8+
5. Check the [./Dockerfile](./Dockerfile) and extend it if necessary
9+
6. Make sure that the whole project can be compiled with a single "make all" command.
810
also implement "make clean"
9-
5. Fill out the [CODEOWNERS](./.github/CODEOWNERS) file. Here is the official github [guide](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)
10-
6. Update and extend if needed the [sonar project file](./.github/sonar-project.properties) .
11-
7. **Internal projects only** Add a self-hosted runner with "devs-self-hosted-runner" name. [guide](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners)
12-
8. Secrets, add your sonarqube token and for **public repositores** add github personal access token.
13-
9. Check the workflow and adjust them according to the repo types (internal of public)
14-
10. Update this Readme file and rempve this list from it.
11+
7. Fill out the [CODEOWNERS](./.github/CODEOWNERS) file. Here is the official github [guide](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)
12+
8. Add github personal access token named "PERSONAL_ACCESS_TOKEN" as a repository secret. It is necessary for CLA signature workflow.
13+
9. Check the available [workflows](./.github/workflows) and adjust them according to the repo types (internal or public)
14+
10. Update this Readme file and remove this list from it.
1515

1616
## Table of Contents
1717
- [Developer Services template project](#developer-services-template-project)
@@ -47,7 +47,7 @@ Using Docker for the build environment has several advantages:
4747
To set up the Docker-based build environment, follow these steps:
4848
1. Install Docker on your machine. Only Linux and MacOS platforms are supported for now.
4949
2. Clone the repository.
50-
3. Build the Docker image using the provided [Dockerfile](./.github/Dockerfile).
50+
3. Build the Docker image using the provided [Dockerfile](./Dockerfile).
5151
4. Run the Docker container with the necessary configurations.
5252

5353
### Windows
@@ -63,7 +63,7 @@ To set up the Docker-based build environment, follow these steps:
6363
**TODO**
6464
Explain how can a developer debug this software project. Pictures are recommended.
6565
## Contributing
66-
Please follow the [CONTRIBUTING](./.github/CONTRIBUTING) guideline-
66+
Please follow the [CONTRIBUTING](./.github/CONTRIBUTING.md) guideline.
6767

6868
## License
6969
See the [LICENSE.md](./LICENSE.md) file for details.

0 commit comments

Comments
 (0)