Skip to content

Commit

Permalink
Clearer error message on provider submission
Browse files Browse the repository at this point in the history
Signed-off-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com>
  • Loading branch information
abstractionfactory authored Oct 19, 2024
1 parent 6bc99d9 commit b659961
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/submit-provider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi
repository=$(echo "${BODY}" | grep "### Provider Repository" -A2 | tail -n1 | tr "[:upper:]" "[:lower:]" | sed -e 's/[\r\n]//g')

if [[ ! "${repository}" =~ ^[a-zA-Z0-9-]+/terraform-provider-[a-zA-Z0-9-]+$ ]]; then
gh issue comment "${NUMBER}" -b "Failed validation: Invalid repository name: '${repository}'. Please submit the repository in the format of ORGANIZATION/terraform-provider-NAME."
gh issue comment "${NUMBER}" -b "Failed validation: Invalid repository name: '${repository}'. Please edit your issue to state the repository in the format of ORGANIZATION/terraform-provider-NAME."
exit 1
fi

Expand Down Expand Up @@ -62,4 +62,4 @@ git push -u origin "${branch}"
# Create pull request and update issue
pr=$(gh pr create --title "${TITLE}" --body "Created ${jsonfile/../src/}) for provider ${namespace}/${name}. Closes #${NUMBER}.") #--assignee opentofu/core-engineers)
gh issue comment "${NUMBER}" -b "Your submission has been validated and has moved on to the pull request phase (${pr}). This issue has been locked."
gh issue lock "${NUMBER}" -r resolved
gh issue lock "${NUMBER}" -r resolved

0 comments on commit b659961

Please sign in to comment.