Skip to content

Update CI pipeline#4

Merged
Theosakamg merged 70 commits intomainfrom
ci_std
Feb 13, 2026
Merged

Update CI pipeline#4
Theosakamg merged 70 commits intomainfrom
ci_std

Conversation

@Theosakamg
Copy link
Collaborator

No description provided.

Copy link

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 performs a major refactoring of the CI pipeline and codebase structure for the Upsun SDK for Node.js. The changes include:

  • Modernized CI/CD: New GitHub Actions workflows with better separation of concerns (quality, tests, doc, coverage, build)
  • Renamed task classes: Changed from singular to plural naming (e.g., ActivityTaskActivitiesTask, BackupTaskBackupsTask)
  • Updated configuration: Added Jest, ESLint, Prettier, and TypeScript test configuration
  • Improved project structure: Better organization with new index files and separation of concerns
  • Enhanced tooling: Updated npm scripts for better development workflow

Changes:

  • Migrated from singular to plural naming for all task classes and test files
  • Added comprehensive CI/CD workflows with quality checks, testing across multiple Node.js versions, and documentation generation
  • Introduced OpenAPI Generator templates for better code generation
  • Updated all import paths to reflect the new structure
  • Added new configuration files for testing, linting, and formatting

Reviewed changes

Copilot reviewed 123 out of 128 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
.github/workflows/develop.yml New PR review workflow with quality checks, tests, doc, and coverage
.github/workflows/publish.yml Updated release workflow with documentation and coverage steps
jest.config.js New Jest configuration with ESM support and coverage settings
eslint.config.js New ESLint configuration using TypeScript ESLint
tsconfig.test.json New TypeScript configuration for tests
package.json Updated scripts for improved development workflow
tests/unit/**/*.test.ts Renamed and updated test files (singular → plural)
src/core/tasks/**/*.ts Renamed and refactored task files with plural naming
src/core/tasks/task_base.ts Expanded validation methods
src/core/index.ts Reorganized exports
src/index.ts Simplified main entry point
templates/**/*.mustache Added OpenAPI Generator templates

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3 to +6
import {
DedicatedDeploymentTargetCreateInputTypeEnum,
SubscriptionStatusEnum,
} from './model/index.js';
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Unused imports DedicatedDeploymentTargetCreateInputTypeEnum, SubscriptionStatusEnum.

Suggested change
import {
DedicatedDeploymentTargetCreateInputTypeEnum,
SubscriptionStatusEnum,
} from './model/index.js';

Copilot uses AI. Check for mistakes.
} from './model/index.js';
import { UpsunClient, UpsunConfig } from './upsun.js';
import dotenv from 'dotenv';
import { ResponseError } from './index.js';
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Unused import ResponseError.

Suggested change
import { ResponseError } from './index.js';

Copilot uses AI. Check for mistakes.
Comment on lines +19 to 22
function delay(ms: number): Promise<void> {
return new Promise(resolve => setTimeout(resolve, ms));
}

Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Unused function delay.

Suggested change
function delay(ms: number): Promise<void> {
return new Promise(resolve => setTimeout(resolve, ms));
}

Copilot uses AI. Check for mistakes.
src/app.ts Outdated
const orgName = "Perso-home"; // Replace with your organization ID
const org = orgs.items?.find((p) => p.label === orgName) ?? null;
console.log(org);
const relationships = await upsun.environments.getDeployment(projectTestId, 'main', 'current');
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Unused variable relationships.

Suggested change
const relationships = await upsun.environments.getDeployment(projectTestId, 'main', 'current');
await upsun.environments.getDeployment(projectTestId, 'main', 'current');

Copilot uses AI. Check for mistakes.
src/app.ts Outdated
Comment on lines +43 to +47
const mountsWebapps = await upsun.mounts.list(
projectTestId,
'main',
DeploymentResourceGroup.webapps,
);
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Unused variable mountsWebapps.

Suggested change
const mountsWebapps = await upsun.mounts.list(
projectTestId,
'main',
DeploymentResourceGroup.webapps,
);

Copilot uses AI. Check for mistakes.
console.log(res);

console.log('--- Set Resources ---');
const response = await upsun.resources.set(
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Unused variable response.

Suggested change
const response = await upsun.resources.set(
await upsun.resources.set(

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +41
import {
AcceptedResponse,
Activity,
CanCreateNewOrgSubscription200Response,
EnvironmentVariableCreateInput,
Project,
ProjectCapabilities,
ProjectPatch,
ProjectSettings,
ProjectVariable,
Subscription,
Blob,
Commit,
Ref,
Tree,
SystemInformation,
Domain,
Certificate,
TeamProjectAccess,
GrantProjectTeamAccessRequestInner,
GrantTeamProjectAccessRequestInner,
ListProjectTeamAccess200Response,
DomainPatch,
UserProjectAccess,
GrantProjectUserAccessRequestInner,
ListProjectUserAccess200Response,
Environment,
ProjectInvitation,
ListOrgProjects200Response,
} from '../../model/index.js';
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Unused imports Blob, Commit, Ref, SystemInformation, Tree.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,121 @@
import { UpsunClient } from '../../upsun.js';
import { Blob, Commit, Metrics, Ref, SystemInformation, Tree } from '../../model/index.js';
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Unused import Metrics.

Copilot uses AI. Check for mistakes.
Comment on lines +33 to +78
import {
AddOnsApi,
ApiTokensApi,
AutoscalingApi,
CertManagementApi,
ConnectionsApi,
DeploymentApi,
DeploymentTargetApi,
DomainManagementApi,
EnvironmentActivityApi,
EnvironmentApi,
EnvironmentBackupsApi,
EnvironmentTypeApi,
EnvironmentVariablesApi,
GrantsApi,
Integrations,
InvoicesApi,
MfaApi,
OrdersApi,
OrganizationInvitationsApi,
OrganizationMembersApi,
OrganizationProjectsApi,
OrganizationsApi,
PhoneNumberApi,
ProfilesApi,
ProjectActivityApi,
ProjectApi,
ProjectInvitationsApi,
ProjectSettingsApi,
ProjectVariablesApi,
RecordsApi,
RepositoryApi,
RoutingApi,
RuntimeOperationsApi,
SourceOperationsApi,
SshKeysApi,
SubscriptionsApi,
SystemInformationApi,
TeamAccessApi,
TeamsApi,
ThirdPartyIntegrationsApi,
UserAccessApi,
UserProfilesApi,
UsersApi,
VouchersApi,
} from './index.js';
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Unused imports DeploymentTargetApi, Integrations.

Copilot uses AI. Check for mistakes.

if (!response.ok) {
throw new Error('Token exchange failed');
return false;
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

This statement is unreachable.

Suggested change
return false;

Copilot uses AI. Check for mistakes.
@Theosakamg Theosakamg force-pushed the ci_std branch 2 times, most recently from ab42d67 to 92244d4 Compare February 13, 2026 16:29
@Theosakamg Theosakamg merged commit 99b419e into main Feb 13, 2026
7 checks passed
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.

3 participants