Skip to content

Conversation

@Sebastiano-Bertolin
Copy link
Collaborator

List of Changes

Move script generateSoapApiRepositoryList to a new package

Motivation and Context

Separation of concern

How Has This Been Tested?

Manually

Screenshots (if appropriate):

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@changeset-bot
Copy link

changeset-bot bot commented Jul 7, 2025

🦋 Changeset detected

Latest commit: b1fdd0a

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

This PR includes changesets to release 2 packages
Name Type
gitbook-docs Patch
soap-api-data Patch

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
Collaborator

@marcobottaro marcobottaro left a comment

Choose a reason for hiding this comment

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

You should add changeset files

…soap-api-scripts' into DEV-2435-create-new-package-for-soap-api-scripts
Copy link
Collaborator

@MarBert MarBert left a comment

Choose a reason for hiding this comment

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

I see you have two changesets. "There can be only one!" (cit.)

@github-actions
Copy link
Contributor

This pull request is stale because it has been open for 14 days with no activity. If the pull request is still valid, please update it within 21 days to keep it open or merge it, otherwise it will be closed automatically.

@github-actions github-actions bot added the stale label Aug 22, 2025
@github-actions github-actions bot removed the stale label Aug 29, 2025
Sebastiano-Bertolin and others added 4 commits September 11, 2025 10:38
Co-authored-by: tommaso1 <tommasorosso1@gmail.com>
Co-authored-by: tommaso1 <tommasorosso1@gmail.com>
Co-authored-by: tommaso1 <tommasorosso1@gmail.com>
Copy link
Collaborator

@MarcoPonchia MarcoPonchia left a comment

Choose a reason for hiding this comment

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

Maybe is better to add an example env file like packages/gitbook-docs/.env.default to show the necessary env var to run it locally

@Sebastiano-Bertolin
Copy link
Collaborator Author

Maybe is better to add an example env file like packages/gitbook-docs/.env.default to show the necessary env var to run it locally

Done 👍

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR creates a new package soap-api-data to separate SOAP API-related functionality from the gitbook-docs package, following separation of concerns principles.

  • Moves the generateSoapApiRepositoriesList script from gitbook-docs to the new soap-api-data package
  • Updates GitHub Actions workflow to use the new package location
  • Creates proper package structure with TypeScript configuration and helper utilities

Reviewed Changes

Copilot reviewed 8 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/soap-api-data/tsconfig.json TypeScript configuration for the new package
packages/soap-api-data/src/helpers/fetchFromStrapi.ts Helper utilities for fetching data from Strapi API
packages/soap-api-data/package.json Package configuration with build scripts and dependencies
packages/soap-api-data/.eslintrc.json ESLint configuration extending custom rules
packages/soap-api-data/.env.default Default environment variables for the package
packages/gitbook-docs/package.json Removes the moved script from gitbook-docs package
.github/actions/clone-soap-api-repos/action.yaml Updates workflow to use new package location
.changeset/true-pandas-act.md Changeset documenting the package changes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

// In case of an error, the error will be thrown
export async function fetchFromStrapi<T>(
url: string
): Promise<{ data: T[]; responseJson?: any }> {
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

The return type uses any for responseJson which reduces type safety. Consider defining a more specific interface for the Strapi response structure or using unknown if the structure is truly variable.

Suggested change
): Promise<{ data: T[]; responseJson?: any }> {
): Promise<{ data: T[]; responseJson?: unknown }> {

Copilot uses AI. Check for mistakes.
Comment on lines +24 to +31
async function fetchFromStrapiResponse(url: string) {
console.log('Fetching from Strapi...');
const strapiEndpoint = process.env.STRAPI_ENDPOINT;
const strapiApiToken = process.env.STRAPI_API_TOKEN;

if (!strapiEndpoint || !strapiApiToken) {
console.error('Missing Strapi configuration in environment variables');
throw new Error('Missing Strapi configuration in environment variables');
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

The error message is duplicated between the console.error and thrown Error. Consider extracting this to a constant to avoid duplication and improve maintainability.

Suggested change
async function fetchFromStrapiResponse(url: string) {
console.log('Fetching from Strapi...');
const strapiEndpoint = process.env.STRAPI_ENDPOINT;
const strapiApiToken = process.env.STRAPI_API_TOKEN;
if (!strapiEndpoint || !strapiApiToken) {
console.error('Missing Strapi configuration in environment variables');
throw new Error('Missing Strapi configuration in environment variables');
const MISSING_STRAPI_CONFIG_ERROR = 'Missing Strapi configuration in environment variables';
async function fetchFromStrapiResponse(url: string) {
console.log('Fetching from Strapi...');
const strapiEndpoint = process.env.STRAPI_ENDPOINT;
const strapiApiToken = process.env.STRAPI_API_TOKEN;
if (!strapiEndpoint || !strapiApiToken) {
console.error(MISSING_STRAPI_CONFIG_ERROR);
throw new Error(MISSING_STRAPI_CONFIG_ERROR);

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

Branch is not up to date with base branch

@Sebastiano-Bertolin it seems this Pull Request is not updated with base branch.
Please proceed with a merge or rebase to solve this.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 10, 2025

Jira Pull Request Link

This Pull Request refers to the following Jira issue DEV-2435

@github-actions
Copy link
Contributor

This pull request is stale because it has been open for 14 days with no activity. If the pull request is still valid, please update it within 21 days to keep it open or merge it, otherwise it will be closed automatically.

@github-actions github-actions bot added the stale label Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants