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

Use applicableSections and supportedAPIs to get consentState #1818

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

akinsola-guardian
Copy link
Contributor

@akinsola-guardian akinsola-guardian commented Nov 27, 2024

What are you changing?

This PR correctly applies correct procedure for getting consent.

  • Retrieve the id of the supportedAPI through the applicableSections array (e.g., 7 for usnat).
  • Use the id to get the name of the supportedAPI (e.g., 7:usnat).
  • Read the consent within the parsedSection.

Why?

  • Recommendation from sourcepoint

Copy link

changeset-bot bot commented Nov 27, 2024

🦋 Changeset detected

Latest commit: b92f509

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Tip

Once this PR is ready to go, add the run_chromatic label to run the Chromatic tests.

This saves us a lot of money by not running the tests before we need them.

@github-actions github-actions bot added 📦 npm Affects a @guardian package on NPM @guardian/libs labels Nov 27, 2024
@akinsola-guardian akinsola-guardian added the 🐥 Canaries Triggers canary releases of any packages with changesets waiting. label Nov 28, 2024
Copy link
Contributor

Note

The following canaries were published to NPM:

🐥

@akinsola-guardian akinsola-guardian marked this pull request as ready for review November 28, 2024 15:10
Copy link
Contributor

Note

The following canaries were published to NPM:

🐥

Copy link
Contributor

Note

The following canaries were published to NPM:

🐥

Copy link
Member

@arelra arelra left a comment

Choose a reason for hiding this comment

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

Looks good. Just a couple of small suggestions

Copy link
Contributor

Note

The following canaries were published to NPM:

🐥

Copy link
Member

@arelra arelra left a comment

Choose a reason for hiding this comment

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

Would it be possible to add a unit test to document this logic?

It's quite hard to follow without knowing the underlying data model for gppData

Copy link
Contributor

Note

The following canaries were published to NPM:

🐥

Copy link
Contributor

Note

The following canaries were published to NPM:

🐥

Copy link
Contributor

Note

The following canaries were published to NPM:

🐥

Copy link
Contributor

Note

The following canaries were published to NPM:

🐥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐥 Canaries Triggers canary releases of any packages with changesets waiting. @guardian/libs 📦 npm Affects a @guardian package on NPM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants