Skip to content

Commit f5c1f13

Browse files
committed
fix: lint and deploy jobs running via a webhook trigger
1 parent c6d1152 commit f5c1f13

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.codebuild/scripts/lint_pr.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
set -xeo pipefail
22
# extract the PR number from the PR link
33
PR_NUM=${CODEBUILD_WEBHOOK_TRIGGER##*/}
4+
PROJECT_USERNAME=aws-amplify
5+
REPO_NAME=amplify-codegen
46

57
if [ -z "$PR_NUM" ]; then
68
echo "Could not determine PR number. Cannot determine fork point for linting. Skipping linting."

.codebuild/scripts/publish.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash -e
22

3+
if [[ "$CODEBUILD_WEBHOOK_TRIGGER" == "pr/"* ]]; then
4+
BRANCH_NAME=${CODEBUILD_WEBHOOK_BASE_REF##*/}
5+
fi
6+
37
if [ -z "$BRANCH_NAME" ]; then
48
echo "BRANCH_NAME is missing"
59
exit 1

0 commit comments

Comments
 (0)