Skip to content

Commit

Permalink
Merge pull request #1316 from opentofu/more-lenient-reponame-handling
Browse files Browse the repository at this point in the history
More lenient repo name handling
  • Loading branch information
abstractionfactory authored Nov 21, 2024
2 parents cab6c36 + de42d13 commit b882f2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/scripts/submit-module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ if [[ -z "${NUMBER}" ]]; then
fi

repository=$(echo "${BODY}" | grep "### Module Repository" -A2 | tail -n1 | tr "[:upper:]" "[:lower:]" | sed -e 's/[\r\n]//g')
repository=$(echo -n "${repository}" | sed -e 's|https://github.com/||' -e 's|github.com/||')

if [[ ! "${repository}" =~ ^[a-zA-Z0-9-]+/terraform-[a-zA-Z0-9-]+$ ]]; then
gh issue comment "${NUMBER}" -b "Failed validation: Invalid repository name: '${repository}'. Please edit your issue to state the name of the repository in the format of ORGANIZATION/terraform-NAME-TARGETSYSTEM."
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/submit-provider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ if [[ -z "${NUMBER}" ]]; then
fi

repository=$(echo "${BODY}" | grep "### Provider Repository" -A2 | tail -n1 | tr "[:upper:]" "[:lower:]" | sed -e 's/[\r\n]//g')
repository=$(echo -n "${repository}" | sed -e 's|https://github.com/||' -e 's|github.com/||')

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 edit your issue to state the repository in the format of ORGANIZATION/terraform-provider-NAME."
Expand Down

0 comments on commit b882f2b

Please sign in to comment.