Skip to content

Commit

Permalink
refactor path var
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Jan 13, 2022
1 parent 52a2019 commit 12dfbed
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/generate-changelog-entry.sh
Expand Up @@ -17,19 +17,20 @@ fi

current_pr=$(curl -s "https://api.github.com/repos/cloudflare/terraform-provider-cloudflare/issues?state=all&per_page=1" | jq -r ".[].number")
next_pr=$(($current_pr + 1))
changelog_path=".changelog/$next_pr.txt"

echo "==> What type of change is this? (enhancement, bug, breaking-change, new-resource, new-data-source, new-guide)"
read entry_type

echo "==> What is the summary of this change? Example: resource/example: made a change to CRUD operations"
read entry_summary

touch $(pwd)/.changelog/$next_pr.txt
cat > $(pwd)/.changelog/$next_pr.txt <<EOF
touch $(pwd)/$changelog_path
cat > $(pwd)/$changelog_path <<EOF
\`\`\`release-note:$entry_type
$entry_summary
\`\`\`
EOF

echo
echo "Successfully created .changelog/$next_pr.txt. Don't forget to commit it and open the PR!"
echo "Successfully created $changelog_path. Don't forget to commit it and open the PR!"

0 comments on commit 12dfbed

Please sign in to comment.