Skip to content

auto azp run#28419

Closed
isra-fel wants to merge 2 commits into
Azure:mainfrom
isra-fel:yeming/auto-azp-run
Closed

auto azp run#28419
isra-fel wants to merge 2 commits into
Azure:mainfrom
isra-fel:yeming/auto-azp-run

Conversation

@isra-fel
Copy link
Copy Markdown
Member

Description

This pull request introduces an automated GitHub Actions workflow and a robust PowerShell script to check Azure organization membership for PR authors, along with comprehensive documentation and tests. The workflow enables automatic triggering of Azure DevOps (ADO) pipelines for PRs submitted by Azure organization members. The new PowerShell script provides structured, testable, and pipeline-friendly membership checks, with clear documentation and a test suite to ensure reliability.

Test PR: isra-fel#12

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copilot AI review requested due to automatic review settings August 19, 2025 07:59
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 introduces an automated Azure DevOps pipeline triggering system for Azure organization members. The system includes a PowerShell script for checking GitHub organization membership, a GitHub Actions workflow that automatically triggers ADO pipelines for PRs from Azure members, and comprehensive documentation and testing.

  • Adds a robust PowerShell script that returns structured objects for membership checks
  • Implements a GitHub Actions workflow that automatically triggers ADO pipelines for Azure organization members
  • Provides comprehensive documentation and testing framework for the membership checker

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/auto-azp-run.yml GitHub Actions workflow that checks PR author's Azure org membership and triggers ADO pipeline
tools/GitHubOrgMember/Check-AzureOrgMembership.ps1 PowerShell script that checks Azure organization membership using GitHub CLI
tools/GitHubOrgMember/README.md Comprehensive documentation with usage examples and API reference
tools/GitHubOrgMember/Test-ObjectBased.ps1 Test suite for validating the membership checker functionality


PowerShell script to check if a GitHub user is a member of the Azure GitHub organization using the GitHub CLI. Re```powershell
$result = .\Check-AzureOrgMembership.ps1 "vidai-msft" -Organization "microsoft" -Quietrns structured PowerShell objects for easy processing and integration.

Copy link

Copilot AI Aug 19, 2025

Choose a reason for hiding this comment

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

There appears to be a corrupted line with partial PowerShell code block syntax. The line should end properly before starting the code example.

Suggested change
PowerShell script to check if a GitHub user is a member of the Azure GitHub organization using the GitHub CLI. Returns structured PowerShell objects for easy processing and integration.
```powershell
$result = .\Check-AzureOrgMembership.ps1 "vidai-msft" -Organization "microsoft" -Quiet

Copilot uses AI. Check for mistakes.

PowerShell script to check if a GitHub user is a member of the Azure GitHub organization using the GitHub CLI. Re```powershell
$result = .\Check-AzureOrgMembership.ps1 "vidai-msft" -Organization "microsoft" -Quietrns structured PowerShell objects for easy processing and integration.

Copy link

Copilot AI Aug 19, 2025

Choose a reason for hiding this comment

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

The text contains a malformed sentence with 'Quietrns' which should be separated into 'Quiet' and 'Returns'. The line appears to have formatting corruption.

Suggested change
PowerShell script to check if a GitHub user is a member of the Azure GitHub organization using the GitHub CLI.
```powershell
$result = .\Check-AzureOrgMembership.ps1 "vidai-msft" -Organization "microsoft" -Quiet

Returns structured PowerShell objects for easy processing and integration.

Copilot uses AI. Check for mistakes.
@isra-fel isra-fel marked this pull request as draft August 19, 2025 08:13
@isra-fel isra-fel closed this Aug 20, 2025
@isra-fel
Copy link
Copy Markdown
Member Author

Feature	pull_request	pull_request_target
Code Source	PR branch	Target branch
Write Permissions	❌ No	✅ Yes
Access Secrets	❌ No (forks)	✅ Yes (always)
Comment on PR	❌ No	✅ Yes
Security Risk	🟢 Low	🟡 Medium-High
Fork Safety	✅ Safe	⚠️ Risky

In conclusion, pull_request cannot comment, pull_request_target is not secure. Will maybe consider ADO pipeline instead.

@isra-fel isra-fel deleted the yeming/auto-azp-run branch August 20, 2025 00:04
@isra-fel isra-fel restored the yeming/auto-azp-run branch August 21, 2025 11:57
@isra-fel isra-fel deleted the yeming/auto-azp-run branch August 22, 2025 00: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