Skip to content

Remove obsolete Azure DevOps configurations and enhance documentation#26

Merged
segraef merged 4 commits into
mainfrom
uplift
Jun 8, 2026
Merged

Remove obsolete Azure DevOps configurations and enhance documentation#26
segraef merged 4 commits into
mainfrom
uplift

Conversation

@segraef

@segraef segraef commented Jun 8, 2026

Copy link
Copy Markdown
Owner

This pull request introduces a major scaffolding and CI modernization for the repository, focusing on improved Bash and PowerShell scripting templates, enhanced linting workflows, and automated template synchronization. It also brings documentation and configuration updates to better support maintainability and code quality.

CI and Linting Improvements

  • Updated CI workflows to use the latest actions/checkout@v4, upgraded to super-linter@v7 with a curated set of enabled linters, and modernized the PSScriptAnalyzer workflow to use the latest version with shared settings and stricter error handling. Linting now runs on both push and pull request events, and permissions are set more securely. (.github/workflows/linter.yml, .github/workflows/scriptanalyzer.yml, .markdownlint.yaml, [1] [2] [3]
  • Added an .editorconfig to enforce consistent code style and whitespace across the repository. (.editorconfig, .editorconfigR1-R16)

Bash and PowerShell Scaffolding

  • Added new Bash scaffolding files: _Template.sh (template script with logging) and log.sh (timestamped logging helpers). Enhanced the avm_manual_analysis.sh script with robust logging, improved variable quoting, and clearer statistical summaries. (Bash/_Template.sh, Bash/log.sh, Bash/avm_manual_analysis.sh, [1] [2] [3] [4]
  • Updated PowerShell scaffolding (not shown in this diff but referenced in the changelog). (CHANGELOG.md, CHANGELOG.mdL9-R27)

Template Synchronization

  • Introduced a Template Sync workflow to automatically keep the repository in sync with updates from the upstream template (segraef/Template), while protecting repository-specific files via .templatesyncignore. (.github/workflows/template-sync.yml, .templatesyncignore, [1] [2]

Documentation and Configuration

  • Expanded the changelog to reflect recent improvements, added a repository structure section to the README (not shown in this diff), and fixed references to the template repository. (CHANGELOG.md, CHANGELOG.mdL9-R27)
  • Corrected and clarified pipeline variable defaults and improved comments in configuration files. (.pipelines/variables.yml, .pipelines/variables.ymlL4-R6)

Other Notable Changes

  • Improved quoting and variable usage throughout shell scripts for safety and consistency. (Bash/avm_manual_analysis.sh, Bash/avm_manual_analysis.shL12-R179)
  • Disabled the push trigger for the Bicep deployment workflow until a main.bicep file is added. (.github/workflows/bicep_deployment.yaml, [1] [2]# Change

Feel free to remove this sample text

Thank you for your contribution !
Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.
List any dependencies that are required for this change.

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update (Wiki)

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • My corresponding pipelines / checks run clean and green without any errors or warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (readme)
  • I did format my code

segraef added 3 commits June 8, 2026 17:36
- Deleted pipeline.variables.yml and pipeline.yml as they are no longer needed.
- Removed parameters.json files for private endpoints, storage accounts, and virtual machines.
- Eliminated scripts for installing pipeline agents and runtime configurations for bare metal and RHEL.
- Cleaned up unnecessary PowerShell and shell scripts related to Azure DevOps agent setup.
- Removed the process-aiml-resource-groups.ps1 script for managing Azure resource groups.
- Update Bicep deployment script to use quoted variables for better handling.
- Improve linter configuration with additional validation options and exclusions.
- Correct email formatting in Code of Conduct for clarity.
- Refine contribution guidelines for better readability and structure.
- Clean up README by removing outdated external links.
- Add .editorconfig for consistent coding styles across files.
- Introduce .markdownlint.yaml for improved markdown linting rules.
Copilot AI review requested due to automatic review settings June 8, 2026 22:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the repository’s scaffolding and CI setup while cleaning up legacy Azure DevOps–related scripts/snippets and improving documentation. It introduces reusable logging/helpers for Bash and PowerShell, standardizes linting/configuration, and adds template synchronization to keep the repo aligned with segraef/Template.

Changes:

  • Modernized GitHub Actions linting (Super-Linter, PSScriptAnalyzer), added EditorConfig/markdownlint config, and added a template-sync workflow + ignore list.
  • Refreshed PowerShell and Bash scaffolding (new Write-Log module, new RepoTools module, new Bash template + logging helpers) and removed many obsolete/“in progress” ADO-related scripts.
  • Updated documentation (README structure section, CONTRIBUTING conventions, new docs note) and tightened Python dependency definitions.

Reviewed changes

Copilot reviewed 81 out of 82 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
README.md Adds repo structure section and fixes repo-local links/badges.
Python/requirements.txt Pins requests range and adds Flask/dotenv deps.
Python/hibp.py Refactors HIBP CLI into functions + adds env key handling.
PSScriptAnalyzerSettings.psd1 Adds shared PSScriptAnalyzer settings baseline.
PowerShell/Write-Log.psm1 Introduces a reusable PowerShell logging module.
PowerShell/Write-Log.ps1 Removes old logging script template.
PowerShell/Update-Repos.ps1 Refactors into dispatcher using RepoTools + Write-Log.
PowerShell/Update-GitHubRepos.ps1 Removes legacy standalone GitHub updater.
PowerShell/Update-AdoRepos.ps1 Removes legacy standalone Azure DevOps updater.
PowerShell/Snippets/Start-AzJit.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Rename-Items.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/RBAC.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Pull-Repos.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Merge-GitHubPRs.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Invoke-RESTAzureDevOps.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Get-RBACDetails.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Get-AllActions.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Generate-Text.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Delete-Items.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Create-SP.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Create-BuildValidationPolicies.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Create-Branches.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Clone-Repos.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Cleanup-LocalGitBranches.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/AVM-ModuleTester.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/ADO-BuiltInVariables.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Add-PullRequests.ps1 Removes snippet content (cleanup).
PowerShell/Snippets/Add-GitHubIssue.ps1 Removes snippet content (cleanup).
PowerShell/Set-AzPolicyDefinitions.ps1 Updates script to PS7+, adds logging, strict mode, structure.
PowerShell/RepoTools.psm1 Adds shared clone/update helpers for GitHub + ADO.
PowerShell/New-AzPipeline.ps1 Refactors pipeline creation into structured functions and logging.
PowerShell/Load-Module.ps1 Updates module loader to PS7+, strict mode, logging, safer flow.
PowerShell/Get-GitHubRateLimit.ps1 Adds PS7 rate-limit monitor using gh api.
PowerShell/Get-DevOpsPrivateRepoFile.ps1 Refactors into function-based PS7 script + SecureString PAT.
PowerShell/Export-AzDOBuildReleaseDefinitions.ps1 Refactors export/import script to PS7+, strict mode, logging.
PowerShell/Activity-Simulator.ps1 Updates script to PS7+, adds logging + improved help text.
PowerShell/_Template.ps1 Refreshes PowerShell template to PS7+, ShouldProcess, strict mode, logging.
LICENSE Updates copyright year range.
flask/server.py Improves structure/docs and removes API-key-leaking route; tweaks debug behavior.
docs/ado-builtin-variables.md Moves ADO variable notes into proper markdown docs.
CONTRIBUTING.md Adds explicit repo conventions for PS/Bash/linting.
CODE_OF_CONDUCT.md Replaces placeholder enforcement contact with real address.
CHANGELOG.md Updates changelog entries and fixes a typo (“Initiated”).
Bash/log.sh Adds shared timestamped logging helpers for Bash.
Bash/avm_manual_analysis.sh Improves safety/quoting/logging and output formatting.
Bash/_Template.sh Adds Bash script template using shared logger + strict mode.
Bash/_ Removes stray placeholder file.
.templatesyncignore Adds ignore rules to protect repo-specific files from template sync.
.pipelines/variables.yml Fixes placeholder quoting/formatting.
.markdownlint.yaml Adds markdownlint configuration used by CI.
.gitignore Expands ignores for Python/Node/logs/temp files.
.github/workflows/template-sync.yml Adds scheduled/manual template sync workflow.
.github/workflows/scriptanalyzer.yml Modernizes PSScriptAnalyzer workflow and uses shared settings.
.github/workflows/linter.yml Modernizes Super-Linter workflow and curates enabled validators.
.github/workflows/bicep_deployment.yaml Disables push trigger; quotes vars; documents missing main.bicep.
.editorconfig Adds repo-wide formatting rules.
_in progress/Stop-AzurePipelines.ps1 Removes in-progress script content (cleanup).
_in progress/Start-AzurePipelines.ps1 Removes in-progress script content (cleanup).
_in progress/process-aiml-resource-groups.ps1 Removes in-progress script content (cleanup).
_in progress/prefix-dev-ae-devops-rg/virtualMachines/vmadowin001.parameters.json Removes in-progress ARM params (cleanup).
_in progress/prefix-dev-ae-devops-rg/virtualMachines/vmadolin001.parameters.json Removes in-progress ARM params (cleanup).
_in progress/prefix-dev-ae-devops-rg/storageAccounts/parameters.json Removes in-progress ARM params (cleanup).
_in progress/prefix-dev-ae-devops-rg/scripts/script.sh Removes in-progress agent script (cleanup).
_in progress/prefix-dev-ae-devops-rg/scripts/script.ps1 Removes in-progress agent script (cleanup).
_in progress/prefix-dev-ae-devops-rg/scripts/Install-PipelineAgents.ps1 Removes in-progress agent script (cleanup).
_in progress/prefix-dev-ae-devops-rg/scripts/Install-PipelineAgent.sh Removes in-progress agent script (cleanup).
_in progress/prefix-dev-ae-devops-rg/scripts/devops_runtime_baremetal.sh Removes in-progress agent script (cleanup).
_in progress/prefix-dev-ae-devops-rg/scripts/devops_runtime_baremetal_rhel.sh Removes in-progress agent script (cleanup).
_in progress/prefix-dev-ae-devops-rg/privateEndpoints/parameters.json Removes in-progress ARM params (cleanup).
_in progress/prefix-dev-ae-devops-rg/pipeline.yml Removes in-progress pipeline YAML (cleanup).
_in progress/prefix-dev-ae-devops-rg/pipeline.variables.yml Removes in-progress pipeline variables (cleanup).
_in progress/prefix-dev-ae-devops-rg/pipeline.jobs.yml Removes in-progress pipeline jobs (cleanup).
_in progress/prefix-dev-ae-devops-rg/parameters.json Removes in-progress ARM params (cleanup).
_in progress/prefix-dev-ae-devops-rg/networkSecurityGroups/parameters.json Removes in-progress ARM params (cleanup).
_in progress/prefix-dev-ae-devops-rg/keyVaults/parameters.json Removes in-progress ARM params (cleanup).
_in progress/gh-ratelimit.ps1 Removes in-progress rate-limit script (replaced by maintained version).
_in progress/gh-ratelimit Removes in-progress Bash rate-limit script (cleanup).
_in progress/clone-azure-avm-repos.ps1 Removes in-progress repo cloning script (cleanup).
_in progress/.pipelines/.templates/pipeline.jobs.script.yml Removes in-progress ADO template (cleanup).
_in progress/.pipelines/.templates/pipeline.jobs.artifact.deploy.yml Removes in-progress ADO template (cleanup).
_in progress/.pipelines/.templates/pipeline.artifacts.yml Removes in-progress ADO template (cleanup).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Python/hibp.py Outdated
Comment on lines +26 to +30
API_URL = 'https://haveibeenpwned.com/api/v3'
PWD_API_URL = 'https://api.pwnedpasswords.com/range'

# Use the API key in the headers
headers = {'hibp-api-key': API_KEY}

# Send the GET request to the HIBP API
response = requests.get(f'{api_url}/breachedaccount/{email}', headers=headers)

# Check the status code of the response
if response.status_code == 404:
print("Email not found in data breaches")
elif response.status_code != 200:
print("Error checking email")
else:
# Extract the name of the breaches from the response
breaches = [breach['Name'] for breach in response.json()]
print(f"Email found in following breaches: {', '.join(breaches)}.")

# Hash the password before sending it to the HIBP API
password = input("Enter your password: ")
hashed_password = hashlib.sha1(password.encode('utf-8')).hexdigest().upper()
prefix = hashed_password[:5]
suffix = hashed_password[5:]

# Send the GET request to the HIBP API
response = requests.get(f'{pwd_api_url}/{prefix}', headers=headers)

# Check the status code of the response
if response.status_code != 200:
print("Error checking password")
else:
HEADERS = {'hibp-api-key': API_KEY}
Comment thread Python/hibp.py Outdated
email: The email address to look up.
"""
try:
response = requests.get(f'{API_URL}/breachedaccount/{email}', headers=HEADERS)
Comment thread Python/hibp.py Outdated
suffix = hashed_password[5:]

try:
response = requests.get(f'{PWD_API_URL}/{prefix}', headers=HEADERS)
Comment thread Python/hibp.py Outdated
Comment on lines +95 to +106
response = requests.get(f'{API_URL}/breaches', headers=HEADERS)
except requests.RequestException as exc:
print(f"Error fetching breaches: {exc}")
return

# Print the status code of the response
print(response.status_code)

# Display the breaches
breaches = json.loads(response.text)
count = len(breaches)
for breach in breaches:
Comment thread Python/hibp.py
Comment thread PowerShell/Write-Log.psm1
Comment on lines +66 to +69
if ($ErrorRecord) {
$trace = ($ErrorRecord.ScriptStackTrace -split "`n") -join ' <- '
Write-Error -Message "$line | $($ErrorRecord.Exception.Message) | $trace"
return
Comment thread PowerShell/New-AzPipeline.ps1 Outdated
Comment thread PowerShell/New-AzPipeline.ps1 Outdated
Comment on lines +281 to +285
$fullYmlPath = $pipeline.FullName.Replace('\', '/')
$pathSplit = $fullYmlPath.Split('/')
$ymlPath = $pathSplit[-5] + '/' + $pathSplit[-4] + '/' + $pathSplit[-3] + '/' + $pathSplit[-2] + '/' + $pathSplit[-1]
$parentFolderName = $pathSplit[-3] # parent folder name
$pipelineName = $pathSplit[-3] # used as the pipeline name
Comment thread PowerShell/New-AzPipeline.ps1
Comment thread PowerShell/Export-AzDOBuildReleaseDefinitions.ps1 Outdated
…ling; update Python scripts to enhance API interactions and add timeout management
@segraef segraef merged commit b394fd5 into main Jun 8, 2026
7 checks passed
@segraef segraef deleted the uplift branch June 8, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants