Tutorial of getting-started-aspnetcore
is not working as it refers un-released API
#35
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: 'Add labels to issues and pull requests' | |
on: | |
issues: | |
types: [ opened ] | |
pull_request: | |
branches: [ 'main*' ] | |
permissions: | |
issues: write | |
pull-requests: write | |
jobs: | |
add-labels-on-issues: | |
if: github.event_name == 'issues' && !github.event.issue.pull_request | |
runs-on: ubuntu-latest | |
steps: | |
- name: check out code | |
uses: actions/checkout@v4 | |
- name: Add labels for package found in bug issue descriptions | |
shell: pwsh | |
run: | | |
Import-Module .\build\scripts\add-labels.psm1 | |
AddLabelsOnIssuesForPackageFoundInBody ` | |
-issueNumber ${{ github.event.issue.number }} ` | |
-issueBody $env:ISSUE_BODY | |
env: | |
GH_TOKEN: ${{ github.token }} | |
ISSUE_BODY: ${{ github.event.issue.body }} | |
add-labels-on-pull-requests: | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- name: check out code | |
uses: actions/checkout@v4 | |
- name: Add labels for files changed on pull requests | |
shell: pwsh | |
run: | | |
Import-Module .\build\scripts\add-labels.psm1 | |
AddLabelsOnPullRequestsBasedOnFilesChanged ` | |
-pullRequestNumber ${{ github.event.pull_request.number }} ` | |
-labelPackagePrefix 'pkg:' | |
env: | |
GH_TOKEN: ${{ github.token }} |