Skip to content

Fail when sort on unknown column #356

Fail when sort on unknown column

Fail when sort on unknown column #356

Workflow file for this run

name: opencosmo CI
on:
pull_request:
branches:
- main
- release
jobs:
lint:
uses: ./.github/workflows/lint.yaml
test:
uses: ./.github/workflows/test.yaml
secrets: inherit
build:
uses: ./.github/workflows/build.yaml
check-changelog:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
- run: git fetch origin ${{ github.event.pull_request.base.ref }}
- name: Check for new files
id: check_files
run: |
NEWS_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- "changes")
if [ -z "$NEWS_FILES" ]; then
echo "PRs must include a news fragment describing their changes in /changes"
exit 1
else
echo "Found news files ${NEWS_FILES}"
fi
OUTPUT=$(echo "$NEWS_FILES" | xargs)
echo "NEWS_FILES=${OUTPUT}" >> "$GITHUB_OUTPUT"
- name: check extensions
run: |
ALLOWED_TYPES=("feature" "bugfix" "doc" "removal" "misc")
for file in ${{ steps.check_files.outputs.NEWS_FILES }}; do
valid="false"
for ext in "${ALLOWED_EXTENSIONS[@]}"; do
if [[ "$file" == *"$ext"* ]]; then
valid="true"
break
fi
done
if ! [[ "$file" == *".rst" ]]; then
valid="false"
fi
if [[ "$valid_extension" == "false" ]]; then
echo "File $file does not have a valid name"
echo "Must be be an rst file and name must include one of of feature, bugfix, doc, removal or misc"
exit 1
fi
done