Refactor instances of DevOps-specific logic from our PS scripts
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 143
Description
Today our PowerShell scripts might contain references to variables created by Azure DevOps (e.g. https://github.com/Azure/azure-sdk-tools/blob/master/eng/common/scripts/get-markdown-files-from-changed-files.ps1#L5)
These scripts may be run in another context and, to prevent finding these couplings iteratively, it makes sense to remove these where they would cause errors.
General design guidelines:
* PowerShell scripts should not directly reference Azure DevOps variables or machine state (e.g. filesystem or specific git configurations), that information should be provided in parameters
* Code which deals with DevOps-specific variables or other data should live in DevOps yaml and provide that data to PowerShell scripts through parameters
An exception here would be a "safe default" where we might check whether we are running in a DevOps context before attempting to access DevOps-specific variables or machine state.
Contributor guide
Assessment
This issue has not been assessed yet.