Skip to content

fix(ospo): skip self-referential template comparison for archetypes repo - #5

Open
syed-awsaf-informed wants to merge 1 commit into
developfrom
bugfix/archetype-self-reference-check
Open

fix(ospo): skip self-referential template comparison for archetypes repo#5
syed-awsaf-informed wants to merge 1 commit into
developfrom
bugfix/archetype-self-reference-check

Conversation

@syed-awsaf-informed

Copy link
Copy Markdown
Contributor

The oss-checker.yml template-comparison check fails when run against the archetypes repo itself, since it checks out archetypes and compares its own files against themselves (always identical). This adds a conditional skip for that specific case.

Copilot AI review requested due to automatic review settings July 17, 2026 12:15
@sonarqubecloud

Copy link
Copy Markdown

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 updates the OSS checker GitHub Actions workflow to avoid a failing/meaningless “template comparison” when the workflow runs in the archetypes template repository itself.

Changes:

  • Skip the archetypes template file comparison when the current repository is the archetypes repo.
  • Emit an informational log explaining why the comparison was skipped.

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

Comment on lines +249 to +252
if (context.repo.repo === 'archetypes') {
record.checks.differsFromTemplate = null;
core.info(`Skipping template comparison for ${targetPath}: target repository is the archetypes template itself.`);
} else if (existsSync(archetypePath)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants