This commit is contained in:
Timothee Guerin 2022-04-12 08:17:58 -07:00 коммит произвёл GitHub
Родитель f07c0303b7
Коммит b1e653695e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 29 добавлений и 19 удалений

29
.github/workflows/consitency-checks.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,29 @@
name: Consitency checks
on:
pull_request:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- run: |
LABEL_NAME=Publish
LABEL_URL=https://api.github.com/repos/$BUILD_REPOSITORY_ID/issues/$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER/labels
echo "Getting labels using $LABEL_URL"
if curl -s "$LABEL_URL" | grep "\"name\": \"$LABEL_NAME\""
then
echo "Publish label was included in the PR, won't be checking for changelog."
else
npx @microsoft/rush change --verify || { echo 'If you run the rush publish command locally and meant to publish the changes, add the publish label to the pr.' ; exit 1; }
fi

Просмотреть файл

@ -16,9 +16,6 @@ stages:
- job: main
displayName: "Build and Unit test"
steps:
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- template: ./templates/verify-changes.yaml
- template: ./templates/build.yaml
- script: npx @microsoft/rush test:ci -v

Просмотреть файл

@ -1,16 +0,0 @@
# Steps to verify there is undocumented changes in the PR.
steps:
- script: |
LABEL_NAME=Publish
LABEL_URL=https://api.github.com/repos/$BUILD_REPOSITORY_ID/issues/$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER/labels
echo "Getting labels using $LABEL_URL"
if curl -s "$LABEL_URL" | grep "\"name\": \"$LABEL_NAME\""
then
echo "Publish label was included in the PR, won't be checking for changelog."
else
npx @microsoft/rush change --verify || { echo '\nIf you run the rush publish command locally and meant to publish the changes, add the publish label to the pr.' ; exit 1; }
fi
displayName: Verify change logs
condition: eq(variables['Build.Reason'], 'PullRequest') # only run step if it is a PR