Skip to content

Merge pull request #208 from ckan/github-206-empty-lines #4

Merge pull request #208 from ckan/github-206-empty-lines

Merge pull request #208 from ckan/github-206-empty-lines #4

Workflow file for this run

name: Changelog Entry
on: [pull_request]
permissions:
contents: read
jobs:
check_file:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check Chanelog Exists
run: |
if [[ $(ls ./changes/${{ github.event.number }}.*) ]]; then
exit 0
else
echo -e "\n"
echo "ERROR: changelog for PR ${{ github.event.number }} does not exist."
echo -e "\n"
exit 1
fi
- name: Check Changelog Extension
run: |
fullfile=$(ls ./changes/${{ github.event.number }}.*)
filename=$(basename -- "$fullfile")
extension="${filename##*.}"
allowed_types='[ "fix", "bugfix", "hotfix", "feature", "misc", "changes", "migration", "removal" ]'
if [[ $allowed_types =~ "\"$extension\"" ]]; then
exit 0
else
echo -e "\n"
echo "ERROR: changelog file ending in ${extension} not supported."
echo -e "\n"
exit 1
fi