This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
feat(data/rat/floor): add norm_num support for int.{floor,ceil,fract}
#60442
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: Add "ready-to-merge" and "delegated" label from comment | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
add_ready_to_merge_label: | |
name: Add ready-to-merge label | |
if: (toJSON(github.event.issue.pull_request) != 'null') && (startsWith(github.event.comment.body, 'bors r+') || contains(toJSON(github.event.comment.body), '\r\nbors r+') || startsWith(github.event.comment.body, 'bors merge') || contains(toJSON(github.event.comment.body), '\r\nbors merge')) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: octokit/request-action@v2.x | |
name: Get PR head | |
id: get_pr_head | |
with: | |
route: GET /repos/:repository/pulls/:pull_number | |
repository: ${{ github.repository }} | |
pull_number: ${{ github.event.issue.number }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Parse steps.get_pr_head.outputs.data, since it is a string | |
- id: parse_pr_head | |
name: Parse PR head | |
uses: gr2m/get-json-paths-action@v1.x | |
with: | |
json: ${{ steps.get_pr_head.outputs.data }} | |
head_user: 'head.user.login' | |
# we skip the rest if this PR is from a fork, | |
# since the GITHUB_TOKEN doesn't have write perms | |
- if: steps.parse_pr_head.outputs.head_user == 'leanprover-community' | |
uses: octokit/request-action@v2.x | |
name: Get comment author | |
id: get_user | |
with: | |
route: GET /repos/:repository/collaborators/:username/permission | |
repository: ${{ github.repository }} | |
username: ${{ github.event.comment.user.login }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Parse steps.get_user.outputs.data, since it is a string | |
- if: steps.parse_pr_head.outputs.head_user == 'leanprover-community' | |
id: parse_user | |
name: Parse comment author permission | |
uses: gr2m/get-json-paths-action@v1.x | |
with: | |
json: ${{ steps.get_user.outputs.data }} | |
permission: 'permission' | |
- if: (steps.parse_pr_head.outputs.head_user == 'leanprover-community') && (steps.parse_user.outputs.permission == 'admin') | |
uses: octokit/request-action@v2.x | |
id: add_label | |
name: Add label | |
with: | |
route: POST /repos/:repository/issues/:issue_number/labels | |
repository: ${{ github.repository }} | |
issue_number: ${{ github.event.issue.number }} | |
labels: '["ready-to-merge"]' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- if: (steps.parse_pr_head.outputs.head_user == 'leanprover-community') && (steps.parse_user.outputs.permission == 'admin') | |
id: remove_labels | |
name: Remove "awaiting-review" and "awaiting-author" | |
# we use curl rather than octokit/request-action so that the job won't fail | |
# (and send an annoying email) if the labels don't exist | |
run: | | |
curl --request DELETE \ | |
--url https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels/awaiting-review \ | |
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | |
curl --request DELETE \ | |
--url https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels/awaiting-author \ | |
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | |
add_delegated_label: | |
name: Add delegated label | |
if: (toJSON(github.event.issue.pull_request) != 'null') && (startsWith(github.event.comment.body, 'bors d') || contains(toJSON(github.event.comment.body), '\r\nbors d')) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: octokit/request-action@v2.x | |
name: Get PR head | |
id: get_pr_head | |
with: | |
route: GET /repos/:repository/pulls/:pull_number | |
repository: ${{ github.repository }} | |
pull_number: ${{ github.event.issue.number }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Parse steps.get_pr_head.outputs.data, since it is a string | |
- id: parse_pr_head | |
name: Parse PR head | |
uses: gr2m/get-json-paths-action@v1.x | |
with: | |
json: ${{ steps.get_pr_head.outputs.data }} | |
head_user: 'head.user.login' | |
# we skip the rest if this PR is from a fork, | |
# since the GITHUB_TOKEN doesn't have write perms | |
- if: steps.parse_pr_head.outputs.head_user == 'leanprover-community' | |
uses: octokit/request-action@v2.x | |
name: Get comment author | |
id: get_user | |
with: | |
route: GET /repos/:repository/collaborators/:username/permission | |
repository: ${{ github.repository }} | |
username: ${{ github.event.comment.user.login }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Parse steps.get_user.outputs.data, since it is a string | |
- if: steps.parse_pr_head.outputs.head_user == 'leanprover-community' | |
id: parse_user | |
name: Parse comment author permission | |
uses: gr2m/get-json-paths-action@v1.x | |
with: | |
json: ${{ steps.get_user.outputs.data }} | |
permission: 'permission' | |
- if: (steps.parse_pr_head.outputs.head_user == 'leanprover-community') && (steps.parse_user.outputs.permission == 'admin') | |
uses: octokit/request-action@v2.x | |
id: add_label | |
name: Add label | |
with: | |
route: POST /repos/:repository/issues/:issue_number/labels | |
repository: ${{ github.repository }} | |
issue_number: ${{ github.event.issue.number }} | |
labels: '["delegated"]' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- if: (steps.parse_pr_head.outputs.head_user == 'leanprover-community') && (steps.parse_user.outputs.permission == 'admin') | |
id: remove_labels | |
name: Remove "awaiting-review" | |
# we use curl rather than octokit/request-action so that the job won't fail | |
# (and send an annoying email) if the labels don't exist | |
run: | | |
curl --request DELETE \ | |
--url https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels/awaiting-review \ | |
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' |