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

2221 public approved repos #625

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

Conversation

TylerZeroMaster
Copy link
Contributor

part of openstax/ce#2221

  • Makes process.env.STACK_NAME available in frontend (see rollup config)
  • Only allows making repositories public if the stack is deployed in production (determined by STACK_NAME)
  • In production, when a book is added to the ABL
    • If it is not public, the user will be asked if they would like to make it public
      • If they would like to make it public, they will need to type public into a prompt
        • If they do not, then the approve process is (silently) aborted
        • If they do, then the backend will attempt to make the repository public by setting private to false in the repository's settings.yml (using the user's token)
      • If they do not wish to make it public, then the approve process behaves like before
    • If the repository is already public, the user will not be prompted
  • Outside of production, the user should never have the option to make a repository public and the backend will raise an error if they try

Remaining changes are primarily related to improving tests.

…w fields

The new GraphQLModel class has methods that simplify conversion to/from graphql

graphql_query returns a linefeed separated list of the class's fields in camelCase (ready for use in graphql

from_node pulls the fields out of the graphql result
fromisoformat now parses 'Z' as utc timezone (+00:00)
api.py: Use `content` instead of `data` for string value
`data` is only supposed to be used for dictionaries

Improve mock http client
This helps the frontend know where it is deployed (prod, staging, etc.)
…ation

Update the backend config to be more similar to frontend
Fix some questionable types in fetchABL
Add type for bookr repository response
Maybe it is a string? If that is true, it is not valid
@TylerZeroMaster TylerZeroMaster requested a review from a team June 27, 2024 14:48
@TylerZeroMaster TylerZeroMaster self-assigned this Jun 27, 2024
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.

1 participant