A4A: improve check if pressable subscription exists #54072
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: Lighthouse Review Requested | |
on: | |
pull_request: | |
types: [review_requested] | |
jobs: | |
add_review_label: | |
runs-on: ubuntu-latest | |
name: Add P2 labels and project | |
steps: | |
- name: Add label "Needs Review" | |
if: ${{ contains(github.event.pull_request.requested_teams.*.name, 'Lighthouse') }} | |
run: | | |
curl --request POST \ | |
--url 'https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels' \ | |
--header 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \ | |
--header 'Accept: application/vnd.github.v3+json' \ | |
--data-raw '{"labels":["[Status] Needs Review"]}' | |
- name: Add author as assignee | |
if: ${{ contains(github.event.pull_request.requested_teams.*.name, 'Lighthouse') }} | |
run: | | |
curl --request PATCH \ | |
--url 'https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}' \ | |
--header 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \ | |
--header 'Accept: application/vnd.github.v3+json' \ | |
--data-raw '{"assignees": [ "${{ github.event.pull_request.user.login }}" ]}' | |
- name: Add to P2 project board | |
if: ${{ contains(github.event.pull_request.requested_teams.*.name, 'Lighthouse') }} | |
run: | | |
curl --request POST \ | |
--url 'https://api.github.com/projects/columns/19237220/cards' \ | |
--header 'Accept: application/vnd.github.inertia-preview+json' \ | |
--header 'Authorization: token ${{ secrets.AUTOMATTIC_FINANCE }}' \ | |
--header 'Content-Type: application/json; charset=utf-8' \ | |
--data-raw '{"content_type": "PullRequest", "content_id": ${{ github.event.pull_request.id }}}' |