Skip to content

Commit

Permalink
test: more merge cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kanadgupta committed Dec 10, 2024
1 parent e04d482 commit 15b2083
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 381 deletions.
6 changes: 0 additions & 6 deletions __tests__/helpers/get-api-mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,3 @@ export function getAPIv1Mock(reqHeaders = {}) {
},
});
}

export function getAPIv1MockWithVersionHeader(v: string) {
return getAPIv1Mock({
'x-readme-version': v,
});
}
82 changes: 0 additions & 82 deletions __tests__/lib/__snapshots__/createGHA.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -164,88 +164,6 @@ jobs:
"
`;

exports[`#createGHA > command inputs > 'openapi' '' > should run GHA creation workflow and generate valid workflow file 1`] = `
"
Your GitHub Actions workflow file has been created! ✨
Almost done! Just a couple more steps:
1. Push your newly created file (.github/workflows/rdme-openapi.yml) to GitHub 🚀
2. Create a GitHub secret called README_API_KEY and populate the value with your ReadMe API key (••••••••••••I_KEY) 🔑
🔐 Check out GitHub's docs for more info on creating encrypted secrets (https://docs.github.com/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository)
🦉 If you have any more questions, feel free to drop us a line! [email protected]
"
`;

exports[`#createGHA > command inputs > 'openapi' '' > should run GHA creation workflow and generate valid workflow file 2`] = `
"# This GitHub Actions workflow was auto-generated by the \`rdme\` cli on 2022-01-01T00:00:00.000Z
# You can view our full documentation here: https://docs.readme.com/docs/rdme
name: ReadMe GitHub Action 🦉
on:
push:
branches:
# This workflow will run every time you push code to the following branch: \`some-branch\`
# Check out GitHub's docs for more info on configuring this:
# https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
- some-branch
jobs:
rdme-openapi:
runs-on: ubuntu-latest
steps:
- name: Check out repo 📚
uses: actions/checkout@v4
- name: Run \`openapi\` command 🚀
uses: readmeio/rdme@v7
with:
rdme: openapi petstore.json --key=\${{ secrets.README_API_KEY }} --id=spec_id
"
`;

exports[`#createGHA > command inputs > 'openapi' '' > should run GHA creation workflow with \`--github\` flag and messy file name and generate valid workflow file 1`] = `
"
Your GitHub Actions workflow file has been created! ✨
Almost done! Just a couple more steps:
1. Push your newly created file (.github/workflows/rdme-openapi-with-github-flag.yml) to GitHub 🚀
2. Create a GitHub secret called README_API_KEY and populate the value with your ReadMe API key (••••••••••••I_KEY) 🔑
🔐 Check out GitHub's docs for more info on creating encrypted secrets (https://docs.github.com/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository)
🦉 If you have any more questions, feel free to drop us a line! [email protected]
"
`;

exports[`#createGHA > command inputs > 'openapi' '' > should run GHA creation workflow with \`--github\` flag and messy file name and generate valid workflow file 2`] = `
"# This GitHub Actions workflow was auto-generated by the \`rdme\` cli on 2022-01-01T00:00:00.000Z
# You can view our full documentation here: https://docs.readme.com/docs/rdme
name: ReadMe GitHub Action 🦉
on:
push:
branches:
# This workflow will run every time you push code to the following branch: \`another-branch\`
# Check out GitHub's docs for more info on configuring this:
# https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
- another-branch
jobs:
rdme-openapi:
runs-on: ubuntu-latest
steps:
- name: Check out repo 📚
uses: actions/checkout@v4
- name: Run \`openapi\` command 🚀
uses: readmeio/rdme@v7
with:
rdme: openapi petstore.json --key=\${{ secrets.README_API_KEY }} --id=spec_id
"
`;

exports[`#createGHA > command inputs > 'openapi:validate' '' > should run GHA creation workflow and generate valid workflow file 1`] = `
"
Your GitHub Actions workflow file has been created! ✨
Expand Down
1 change: 0 additions & 1 deletion __tests__/lib/createGHA.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ describe('#createGHA', () => {
// `openapi:validate` is the ID we define in src/index.ts for backwards compatibility,
// hence we're using this command ID here
{ cmd: 'openapi:validate', opts: { spec: 'petstore.json' }, label: '' },
{ cmd: 'openapi', opts: { key, spec: 'petstore.json', id: 'spec_id' }, label: '' },
{ cmd: 'changelogs', opts: { key, path: './changelogs' }, label: '' },
{
cmd: 'changelogs',
Expand Down
70 changes: 0 additions & 70 deletions __tests__/lib/prompts.test.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib/apiError.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* APIv1ErrorResponse is the shape of the error response we get from ReadMe API v1.
*/
export interface APIv1ErrorResponse {
interface APIv1ErrorResponse {
docs?: string;
error: string;
help?: string;
Expand Down
9 changes: 0 additions & 9 deletions src/lib/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ export const titleFlag = Flags.string({
description: 'An override value for the `info.title` field in the API definition',
});

/**
* Used in any command where `version` is a flag.
*/
export const versionFlag = Flags.string({
description:
'If running command in a CI environment and this option is not passed, the main project version will be used. See our docs for more information: https://docs.readme.com/main/docs/versions',
summary: 'ReadMe project version',
});

/**
* Used in the `openapi` family of commands where `workingDirectory` is an option.
*/
Expand Down
132 changes: 0 additions & 132 deletions src/lib/prompts.ts

This file was deleted.

Loading

0 comments on commit 15b2083

Please sign in to comment.