Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
harryajc authored Jan 3, 2025
2 parents 93082ad + 14e4a11 commit 9dae6ac
Show file tree
Hide file tree
Showing 1,742 changed files with 73,282 additions and 1,630 deletions.
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "netbox_devicetype-library",
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
"remoteEnv": {
"HISTSIZE": "10000",
"HISTFILESIZE": "20000"
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip install -r requirements.txt",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"DavidAnson.vscode-markdownlint",
"EditorConfig.EditorConfig",
"Percy.vscode-pydata-viewer",
"Tyriar.sort-lines",
"charliermarsh.ruff",
"esbenp.prettier-vscode",
"ms-python.python",
"ms-vscode-remote.vscode-remote-extensionpack",
"redhat.vscode-yaml"
]
}
}
}
23 changes: 14 additions & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,29 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
directory: /
schedule:
interval: monthly
time: '02:00'
timezone: America/New_York
labels:
- dependencies
target-branch: master
assignees:
- "danner26"
- package-ecosystem: "github-actions"
directory: "/"
- danner26
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
time: '02:00'
timezone: America/New_York
labels:
- dependencies
target-branch: master
assignees:
- "danner26"
- danner26
- package-ecosystem: devcontainers
directory: /
schedule:
interval: monthly
labels:
- dependencies
target-branch: master
assignees:
- danner26
34 changes: 24 additions & 10 deletions .github/workflows/master-slugs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ on:
- master
jobs:
build:
if: "!contains(github.event.head_commit.message, 'Regenerate master slug list after successful PR merge')"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ssh-key: ${{secrets.SLUG_DEPLOY_KEY}}
- name: Setup Python
uses: actions/setup-python@v5
id: setup_python
Expand All @@ -32,13 +35,24 @@ jobs:
if: steps.cache-venv.outputs.cache-hit != 'true'
- name: Regenerate Master Slug List
run: python3 tests/generate-slug-list.py
- name: Commit and Push Changes to Master
uses: EndBug/add-and-commit@v9
with:
author_name: NetBox-Bot
author_email: info@netboxlabs.com
committer_name: NetBox-Bot
committer_email: info@netboxlabs.com
default_author: github_actions
message: "Regenerate master slug list after successful PR merge"
push: true
- name: Set-Up Git
run: |
git config --global user.name 'NetBox-Bot'
git config --global user.email 'info@netboxlabs.com'
- name: Commit
run: |
git add .
git commit -m "Regenerate master slug list after successful PR merge"
- name: Push to remote
run: |
git push
# - name: Commit and Push Changes to Master
# uses: EndBug/add-and-commit@v9
# with:
# author_name: NetBox-Bot
# author_email: info@netboxlabs.com
# committer_name: NetBox-Bot
# committer_email: info@netboxlabs.com
# default_author: github_actions
# message: "Regenerate master slug list after successful PR merge"
# push: true
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: Close stale PRs
on:
schedule:
- cron: '0 4 * * *'
- cron: 0 4 * * *
jobs:
stale:
runs-on: ubuntu-latest
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/update-generated-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Gather New NetBox Generated Schema JSON
on:
schedule:
- cron: '0 */12 * * *'
- cron: 0 */12 * * *
jobs:
schema-update:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -46,11 +46,11 @@ jobs:
run: python3 scripts/update-schema.py
if: ${{ steps.netbox-release.outputs.release != vars.SCHEMA_VERSION }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
commit-message: "Regenerate master slug list after successful PR merge"
committer: "NetBox-Bot <info@netboxlabs.com>"
author: "NetBox-Bot <info@netboxlabs.com>"
commit-message: Regenerate master slug list after successful PR merge
committer: NetBox-Bot <info@netboxlabs.com>
author: NetBox-Bot <info@netboxlabs.com>
branch: ${{ steps.netbox-release.outputs.release }}
delete-branch: true
base: master
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ jobs:
run: pytest --tb=short -v
- name: Check for pickle file change
id: pickle-change
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@v45
with:
files: 'tests/known-slugs.pickle'
files: tests/known-slugs.pickle
- name: Add PR Comment if pickle file is modified
uses: mshick/add-pr-comment@v2
if: steps.pickle-change.outputs.any_changed == 'true'
Expand Down
4 changes: 4 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
default: true

MD013: false
7 changes: 5 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
files: ^(device-types|module-types)/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -19,6 +18,10 @@ repos:
- id: yamllint
name: Lint YAML files
args: [--format, parsable, --strict]
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.14.0
hooks:
- id: markdownlint-cli2
- repo: local
hooks:
- id: pytest
Expand Down
Loading

0 comments on commit 9dae6ac

Please sign in to comment.