Bug 557680: [Instability][NAV.master] Tests are unstable in task RunALTests_CZ_Bucket1. (AUTODETECTED) - T001_PostingDateIsInNotAllowedPeriodInGLSetup #7633
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Work Item Validation | |
on: | |
pull_request_target: | |
types: [opened, synchronize, reopened, edited] | |
branches: [ 'main', 'releases/*' ] | |
permissions: | |
contents: read | |
pull-requests: write | |
issues: write | |
defaults: | |
run: | |
shell: pwsh | |
jobs: | |
GitHubIssueValidation: | |
if: github.repository_owner == 'microsoft' && github.event.pull_request.state == 'open' | |
name: 'Validate link to issues' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Validate work items for pull request | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
build/scripts/PullRequestValidation/ValidateIssuesForPullRequest.ps1 -PullRequestNumber ${{ github.event.pull_request.number }} -Repository ${{ github.repository }} | |
WorkItemValidationForMicrosoft: | |
if: github.repository_owner == 'microsoft' && github.event.pull_request.state == 'open' | |
name: 'For Microsoft: Validate link to internal work items' | |
runs-on: ubuntu-latest | |
needs: GitHubIssueValidation | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Link work items to pull request if possible | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
build/scripts/PullRequestValidation/LinkPullRequestToWorkItem.ps1 -PullRequestNumber ${{ github.event.pull_request.number }} -Repository ${{ github.repository }} | |
- name: Validate internal work items for pull request | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
build/scripts/PullRequestValidation/ValidateInternalWorkItemForPullRequest.ps1 -PullRequestNumber ${{ github.event.pull_request.number }} -Repository ${{ github.repository }} | |
- name: Add Linked label to PR | |
if: github.event.pull_request.head.repo.full_name != github.repository | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh api /repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels -f "labels[]=Linked" -H "Accept: application/vnd.github.v3+json" -H "X-GitHub-Api-Version: 2022-11-28" | |
- name: Add milestone to PR | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
build/scripts/PullRequestValidation/AddMilestoneToPullRequest.ps1 -PullRequestNumber ${{ github.event.pull_request.number }} -Repository ${{ github.repository }} |