opensafely-core / opensafely-core/opencodelists

Rename `API_TOKEN` to something more specific

Open
#2,869 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

deck-scrubbing
Dominant language
Python
Stars
60
Forks
16
Avg merge
4d 12h
Merged PRs (30d)
17

Description

Why are we doing this?

I noticed that we use API_TOKEN as an environment variable name when reviewing #2862.

API_TOKEN is used in scripts and quite generic:

  • it's not easy to identify what this is for and where it originates
  • it can be overloaded by a user's environment variables where maybe they similarly have something configured with the same name.

How will we know when it's done?

There's a better name for the environment variable.

What are we doing?

  • Changing the name of the environment variable.
  • If this needs updating in a deployment anywhere, adding the new environment variable, deploying the change, and then removing the old environment variable.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the repository's scripts and deployment configuration for uses of API_TOKEN, then trace where the variable originates and is consumed. Choose a more specific name, update every repository reference, and verify any deployment environment is migrated so the old name can be removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.