Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ntrnl 377 add environment variables to substitute reference to cabinet office or co words #64

Conversation

DanielMurray97
Copy link
Contributor

@DanielMurray97 DanielMurray97 commented Apr 4, 2024

JIRA link

NTRNL-377

Description

  • Add global variable ORG_NAME for generalisation.

Work checklist

  • Tests added where applicable
  • No vulnerability added

Copy link

github-actions bot commented Apr 4, 2024

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 100% 812/812
🟢 Branches 96.88% 31/32
🟢 Functions 100% 64/64
🟢 Lines 100% 754/754

Test suite run success

174 tests passing in 47 suites.

Report generated by 🧪jest coverage report action from d9fbd01

src/config/index.ts Outdated Show resolved Hide resolved
@harley-harris
Copy link
Contributor

harley-harris commented Apr 8, 2024

On the add-member page, the "Is the GitHub account holder permanently employed within the CO orginsation?" string needs updating to use an env variable, something like:

"Is the GitHub account holder permanently employed within the {{ DEPARTMENT_NAME }} department?"

Organisation doesn't make sense in this context as we are civil servants are employed by departments.

@@ -1,7 +1,8 @@
import { getEnvironmentValue } from '../utils/getEnvironmentValue';

export const SERVICE_NAME = 'GitHub Requests';
export const ORG_NAME = 'The Cabinet Office';
export const DEPARTMENT_NAME = 'Cabinet Office';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These would probably be better in .env.example so they are easier for users to change

@@ -1,7 +1,8 @@
import { getEnvironmentValue } from '../utils/getEnvironmentValue';

export const SERVICE_NAME = 'GitHub Requests';
export const ORG_NAME = 'The Cabinet Office';
export const DEPARTMENT_NAME = 'Cabinet Office';
export const GITHUB_ORG_NAME = 'Cabinet Office';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be cabinetoffice

@DanielMurray97 DanielMurray97 force-pushed the NTRNL-377-add-environment-variables-to-substitute-reference-to-cabinet-office-or-co-words branch from d5c8005 to d9fbd01 Compare April 12, 2024 10:59
@@ -10,6 +10,8 @@ GITHUB_OWNER="test"
GITHUB_REPO_ISSUE_ASSIGNEE="test"
GITHUB_REPO_ISSUE_LABEL="test"
GITHUB_TERRAFORM_REPO="test"
DEPARTMENT_NAME ="Cabinet Office"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

env vars are alphabetical

@DanielMurray97 DanielMurray97 merged commit 706e220 into main Apr 15, 2024
6 checks passed
@DanielMurray97 DanielMurray97 deleted the NTRNL-377-add-environment-variables-to-substitute-reference-to-cabinet-office-or-co-words branch April 15, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants