build(deps): bump github.com/olekukonko/tablewriter from 0.0.5-0.20200416053754-163badb3bac6 to 0.0.5 #1803
Workflow file for this run
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: Check Pull Request labels | |
on: | |
pull_request: | |
types: [opened, labeled, unlabeled, synchronize] | |
concurrency: | |
group: format('{0}-{1}', ${{ github.ref }}, 'Check Pull Request labels') | |
cancel-in-progress: true | |
jobs: | |
check_pull_request_labels: | |
name: Check Pull Request labels | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
if: github.repository == 'vitessio/vitess' | |
steps: | |
- name: Release Notes label | |
run: | | |
if [[ "${{contains( github.event.pull_request.labels.*.name, 'release notes (needs details)')}}" == "true" ]]; then | |
echo The "release notes (needs details)" label is set. The changes made in this Pull Request need to be documented in the release notes summary "('./changelog/14.0/14.0.5/summary.md')". Once documented, the "release notes (needs details)" label can be removed. | |
exit 1 | |
fi | |
- name: Check type and component labels | |
env: | |
PR_NUMBER: ${{ github.event.pull_request.number }} | |
run: | | |
LABELS_JSON="/tmp/labels.json" | |
# Get labels for this pull request | |
curl -s \ | |
-H 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Content-type: application/json" \ | |
"https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" \ | |
> "$LABELS_JSON" | |
if ! cat ${LABELS_JSON} | jq -r '.[].name ' | grep -q 'Component:' ; then | |
echo "Expecting PR to have label 'Component: ...'" | |
exit 1 | |
fi | |
if ! cat ${LABELS_JSON} | jq -r '.[].name ' | grep -q 'Type:' ; then | |
echo "Expecting PR to have label 'Type: ...'" | |
exit 1 | |
fi | |
- name: Check NeedsWebsiteDocsUpdate and NeedsDescriptionUpdate are off | |
env: | |
PR_NUMBER: ${{ github.event.pull_request.number }} | |
run: | | |
LABELS_JSON="/tmp/labels.json" | |
# Get labels for this pull request | |
curl -s \ | |
-H 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Content-type: application/json" \ | |
"https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" \ | |
> "$LABELS_JSON" | |
if cat ${LABELS_JSON} | jq -r '.[].name ' | grep -q 'NeedsDescriptionUpdate' ; then | |
echo "Expecting PR to not have the NeedsDescriptionUpdate label, please update the PR's description and remove the label." | |
exit 1 | |
fi | |
if cat ${LABELS_JSON} | jq -r '.[].name ' | grep -q 'NeedsWebsiteDocsUpdate' ; then | |
echo "Expecting PR to not have the NeedsWebsiteDocsUpdate label, please update the documentation and remove the label." | |
exit 1 | |
fi | |
- name: Do Not Merge label | |
run: | | |
if [[ "${{contains( github.event.pull_request.labels.*.name, 'Do Not Merge')}}" == "true" ]]; then | |
echo "This PR should not be merged. The 'Do Not Merge' label is set. Please unset it if you wish to merge this PR." | |
exit 1 | |
fi |