Skip to content

Bug: PSRule throw exception when a Repo is disabled #123

@bpodlejski

Description

@bpodlejski

🐞 Bug Report

Describe the bug

When running PSRule.Rules.AzureDevOps against project where Repository is Disabled, script throw exception:
image


Is this a regression?

I didn't check older versions.


To Reproduce

I created Azure DevOps organization and fresh project for that.

  1. imported PSRule.Rules.AzureDevOps repository to project
  2. setup PSRule pipeline like in instructions.
  3. run pipeline (this is properly working try):
    image
    so far is ok (PSRule shows missconfigurations)
  4. disable any repo that is not PSRule repo:
    image
  5. run pipeline, it will fail:
    image

Expected behaviour

I would like the script not to stop. During our migration to Github we disable, not delete old repositories.


Your environment

  • OS: Ubuntu 22.04
  • PowerShell version: 7.2
  • PSRule version: newest commit from main
  • PSRule.Rules.AzureDevOps version: newest commit from main

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions