This commit is contained in:
AllyW 2025-01-24 09:59:55 +08:00 коммит произвёл GitHub
Родитель 53966604b5
Коммит ff48ca5faf
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 38 добавлений и 0 удалений

10
.github/template/git-hooks-note.md поставляемый Normal file
Просмотреть файл

@ -0,0 +1,10 @@
The git hooks are available for **azure-cli** and **azure-cli-extensions** repos. They could help you run required checks before creating the PR.
Please sync the latest code with latest dev branch (for **azure-cli**) or main branch (for **azure-cli-extensions**).
After that please run the following commands to enable git hooks:
```bash
pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
```

28
.github/workflows/GitHookNotice.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,28 @@
name: Git Hook Notice
on:
pull_request_target:
types: [opened]
branches:
- main
permissions: {}
jobs:
git-hook-notice:
runs-on: ubuntu-latest
permissions:
pull-requests: write
name: Introduce git hook in developer env
steps:
- name: Checkout git hook notice message
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/template/git-hooks-note.md
- name: Comment on pull request
uses: mshick/add-pr-comment@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message-id: gitHookNoticeComment
message-path: |
.github/template/git-hooks-note.md