docs: add engineering section #896
Workflow file for this run
This file contains hidden or 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: PR - Request report labels | |
| # Warning, this job is running on pull_request_target and therefore has access to issue content. | |
| # Don't add any steps that act on external code. | |
| on: | |
| pull_request_target: | |
| types: [ opened, reopened, synchronize, labeled, unlabeled, edited ] | |
| branches: | |
| - main | |
| - beta | |
| - release | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| require-report-label: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Validate report label | |
| id: validate | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| ./scripts/ci/validate-pr-report-labels.sh "$PR_NUMBER" | while read -r line; do | |
| echo "$line" | |
| if [[ "$line" == "valid="* ]] || [[ "$line" == "message="* ]]; then | |
| echo "$line" >> "$GITHUB_OUTPUT" | |
| fi | |
| done | |
| - name: Fail if invalid | |
| if: steps.validate.outputs.valid == 'false' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| MESSAGE: ${{ steps.validate.outputs.message }} | |
| IDENTIFIER: "<!-- pr-report-label-validation-comment -->" | |
| run: | | |
| ./scripts/ci/manage-pr-comment.sh "$PR_NUMBER" "$IDENTIFIER" "$MESSAGE" "invalid" | |
| echo "::error::$MESSAGE" | |
| exit 1 | |
| - name: Mark as resolved if valid | |
| if: steps.validate.outputs.valid == 'true' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| IDENTIFIER: "<!-- pr-report-label-validation-comment -->" | |
| run: | | |
| ./scripts/ci/manage-pr-comment.sh "$PR_NUMBER" "$IDENTIFIER" "" "valid" |