Skip to content

Commit

Permalink
change settings to match code references
Browse files Browse the repository at this point in the history
  • Loading branch information
InTheCloudDan committed Apr 12, 2021
1 parent 33825e0 commit c1effc3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
13 changes: 11 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,25 @@ description: 'Find LaunchDarkly Flags in your Pull Request'
runs:
using: 'docker'
image: 'Dockerfile'
env:
LD_PROJ_KEY: ${{ inputs.projKey }}
LD_ACCESS_TOKEN: ${{ inputs.accessToken }}
LD_BASE_URI: ${{ inputs.baseUri }}
LD_ENV_KEY: ${{ inputs.envKey }}
GITHUB_TOKEN: ${{ inputs.githubToken }}
inputs:
project:
projKey:
description: 'LaunchDarkly Project'
required: true
default: 'default'
environment:
envKey:
description: 'LaunchDarkly Environment for Project'
required: true
default: 'prod'
baseUri:
description: 'LaunchDarkly Instance'
required: no
default: 'https://app.launchdarkly.com'
githubToken:
description: 'Token to access your GitHub repository.'
required: true
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ import (
)

func main() {
ldProject := os.Getenv("INPUT_PROJECT")
ldProject := os.Getenv("LD_PROJ_KEY")
if ldProject == "" {
fmt.Println("`project` is required.")
}
ldEnvironment := os.Getenv("INPUT_ENVIRONMENT")
ldEnvironment := os.Getenv("LD_ENV_KEY")
if ldEnvironment == "" {
fmt.Println("`environment` is required.")
}
ldInstance := os.Getenv("INPUT_INSTANCE")
ldInstance := os.Getenv("LD_BASE_URI")
if ldEnvironment == "" {
fmt.Println("`baseUri` is required.")
}
Expand All @@ -45,9 +45,9 @@ func main() {
if err != nil {
fmt.Printf("error parsing GitHub event payload at %q: %v", os.Getenv("GITHUB_EVENT_PATH"), err)
}
apiToken := os.Getenv("LAUNCHDARKLY_ACCESS_TOKEN")
apiToken := os.Getenv("LD_ACCESS_TOKEN")
if apiToken == "" {
fmt.Println("LAUNCHDARKLY_ACCESS_TOKEN is not set.")
fmt.Println("LD_ACCESS_TOKEN is not set.")
os.Exit(1)
}

Expand Down

0 comments on commit c1effc3

Please sign in to comment.