Translation Pipeline PR #73781
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: Labeler | |
on: [pull_request] | |
jobs: | |
label: | |
permissions: | |
pull-requests: write # to update pull request | |
contents: read # to read the contents of the repository | |
statuses: write # to set the status of the commit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/labeler@v4 | |
with: | |
repo-token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Set documentation preview | |
if: github.event.pull_request.head.repo.fork == false && github.ref != 'refs/heads/guacbot/translation-pipeline' | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
github.rest.repos.createCommitStatus({ | |
"owner": context.repo.owner, | |
"repo": context.repo.repo, | |
"sha": context.payload.pull_request.head.sha, | |
"state": "success", | |
"context": "preview", | |
"description": `Check preview branch "${context.payload.pull_request.head.ref}"`, | |
"target_url": `https://docs-staging.datadoghq.com/${context.payload.pull_request.head.ref}` | |
}) |