Skip to content

Commit

Permalink
Fix vendorProfileID validation (TheThingsNetwork#783)
Browse files Browse the repository at this point in the history
* Fix vendorProfileID validation

* update pull request template
  • Loading branch information
LDannijs authored May 7, 2024
1 parent 3aa4c61 commit 68b1d41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Closes #0000, References #0000, etc.
- [ ] Title and description should be descriptive (Not just a serial number for example).
- [ ] `profileIDs` should not be `vendorID` and should be a unique value for every profile.
- [ ] All devices should be listed in the vendor's `index.yaml` file.
- [ ] Firmware versions can not be changed.
- [ ] At least 1 image per device and should be transparent.

#### Notes for Reviewers
Expand Down
2 changes: 1 addition & 1 deletion bin/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ vendors.vendors.forEach((v) => {

if (!vendorProfiles[vendorID][regionProfile.id]) {
const profile = yaml.load(fs.readFileSync(`./vendor/${vendorID}/${regionProfile.id}.yaml`));
if (profile.vendorProfileID) {
if ('vendorProfileID' in profile) {
console.log(`\n${key}: vendorProfileID exists. This method has been replaced with VendorIDs, see:`);
console.log(`https://github.com/TheThingsNetwork/lorawan-devices?tab=readme-ov-file#vendor-device-index`);
process.exit(1);
Expand Down

0 comments on commit 68b1d41

Please sign in to comment.