-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split workitem validation and labeling workflows #2960
base: main
Are you sure you want to change the base?
Conversation
shell: pwsh | ||
|
||
jobs: | ||
GitHubIssueValidation: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't there be a check here that the parent workflow was successful?
# If the pull request is not from a fork, add a comment to the pull request | ||
if (-not $PullRequest.IsFromFork()) { | ||
# If the pull request is not from a fork and not validate only, add a comment | ||
if (-not $PullRequest.IsFromFork() -and -not $ValidateOnly) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull requests: write
permissions are only needed to add the comment, right?
How about we scratch that part? The workflow error should be descriptive enough.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
build/scripts/PullRequestValidation/ValidateInternalWorkItemForPullRequest.ps1 -PullRequestNumber ${{github.event.workflow_run.pull_requests[0].number}} -Repository ${{ github.repository }} | ||
- name: Add Linked label to PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Add Linked label to PR | |
- name: Add Linked label to PR |
run: | | ||
build/scripts/PullRequestValidation/AddMilestoneToPullRequest.ps1 -PullRequestNumber ${{github.event.workflow_run.pull_requests[0].number}} -Repository ${{ github.repository }} | ||
Label: | ||
name: 'Label pull request' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the same workflow, can't the two jobs be consolidated as well?
Summary
Split workitem validation and labeling workflows
Work Item(s)
Fixes AB#565728