Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearer error message on provider submission #1178

Merged
merged 1 commit into from
Oct 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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