Removing import of node-fetch to use the node built in fetch function directly

Signed-off-by: cmoulliard <cmoulliard@redhat.com>
This commit is contained in:
cmoulliard
2024-01-10 11:09:16 +01:00
parent 6f145d5097
commit 25c3850edf
2 changed files with 1 additions and 3 deletions
@@ -113,7 +113,7 @@ describe('publish:gitea', () => {
rest.post('https://gitea.com/api/v1/orgs/org1/repos', (req, res, ctx) => {
// Basic auth must match the user and password defined part of the config
expect(req.headers.get('Authorization')).toBe(
'Basic Z2l0ZWFfdXNlcjpnaXRlYV9wYXNzd29yZA==',
'basic Z2l0ZWFfdXNlcjpnaXRlYV9wYXNzd29yZA==',
);
expect(req.body).toEqual({
name: 'repo',
@@ -28,10 +28,8 @@ import {
parseRepoUrl,
} from '@backstage/plugin-scaffolder-node';
import { examples } from './gitea.examples';
import fetch, { RequestInit, Response } from 'node-fetch';
import crypto from 'crypto';
/* NOT USED. See TODO hereafter */
const checkGiteaContentUrl = async (
config: GiteaIntegrationConfig,
options: {