Skip to content

Avoid using environment variables in a constant

The following discussion from !2396 (merged) should be addressed:

  • @godfat-gitlab started a discussion: (+1 comment)

    This seems to break my local tests. I am not sure why it's working on CI 🤔 The error I am getting is:

    Failure/Error: TOKEN_HEADER = { headers: { 'Private-Token': Triage.api_token(:com) } }.freeze
    
    KeyError:
      key not found: "GITLAB_COM_API_TOKEN"

    This is expected, because this is outside of RSpec and we only stub the token inside RSpec.