forked from microsoft/ALAppExtensions
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (49 loc) · 1.88 KB
/
WorkitemValidation.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Work Item Validation
on:
pull_request_target:
types: [opened, synchronize, reopened, edited]
branches: [main]
defaults:
run:
shell: pwsh
jobs:
GitHubIssueValidation:
if: github.repository_owner == 'microsoft' && github.event.pull_request.state == 'open'
name: 'Validate link to issues'
permissions:
contents: read
pull-requests: write
issues: write
repository-projects: read
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- 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'
permissions:
contents: read
pull-requests: write
issues: write
repository-projects: read
runs-on: ubuntu-latest
needs: GitHubIssueValidation
steps:
- name: Checkout
uses: actions/checkout@v3
- 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 }}