-
Notifications
You must be signed in to change notification settings - Fork 142
[PETOSS-829] Add codegen testing and replace linters #757
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
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
4f30dd6
[PETOSS-829] added OAS-release actions and PR- Health check
ryanNexus 27ddddf
fix: change npm ci to npm install and add package-lock.json
ryanNexus a07f371
[PETOSS-829] use npm ci not install as its faster
ryanNexus 4f15215
[PETOSS-829] use latest version of npm
ryanNexus a950752
[PETOSS-829] gha fixes
ryanNexus 8a7e8c0
[PETOSS-829] gha fixes +1
ryanNexus d046385
[PETOSS-829] gha fixes +2
ryanNexus 87c005e
[PETOSS-829] gha fixes +3
ryanNexus 3ae3ee1
[PETOSS-829] gha fixes +4
ryanNexus 9492985
fix: use public npm registry instead of Xero Artifactory
ryanNexus 92c753e
[PETOSS-829] removed linter as its now a seperate action
ryanNexus fd4f976
[PETOSS-829] gha fixes +5
ryanNexus 4d31438
[PETOSS-829] rolledback to v1 of dispatch as v2 creates a distinct i…
ryanNexus baf70ab
[PETOSS-829] updated how the sdk generation is called
ryanNexus f9bf5b2
[PETOSS-829] increase timeout
ryanNexus 1d8fa8f
[PETOSS-829] removed disabled linting steps
ryanNexus 0ae6260
[PETOSS-829] re phrased readme
ryanNexus f3f6795
[PETOSS-829] re named OAS release to Github release
ryanNexus bc66166
[PETOSS-829] removed auto merge GHA step
ryanNexus f351437
[PETOSS-829] removed redundant code
ryanNexus d884869
[PETOSS-829] removed more auto merging code
ryanNexus cd1d669
[PETOSS-829] renamed package to function name
ryanNexus 5833874
[PETOSS-829] moved commit lint files to .github folder
ryanNexus 499a03e
[PETOSS-829] set working directory for commit lint
ryanNexus e5e3798
[PETOSS-829] Update package config
the-chris-mitchell 6b0ee15
[PETOSS-829] Remove workflow and generator code
the-chris-mitchell 2948e67
[PETOSS-829] Rename workflows
the-chris-mitchell 309009a
[PETOSS-829] Make consistent and update naming
the-chris-mitchell 2b26a3d
[PETOSS-829] Increase timeout
the-chris-mitchell 3f39109
[PETOSS-829] Change config file format
the-chris-mitchell 619da55
[PETOSS-829] Update installation process and paths
the-chris-mitchell 1eb1bcc
[PETOSS-829] Rename jobs
the-chris-mitchell 500f0b7
[PETOSS-829] Reformat yaml
the-chris-mitchell 0502525
[PETOSS-829] Consolidate pr validation steps
the-chris-mitchell 04e9e89
[PETOSS-829] Update linter version
the-chris-mitchell 71173b0
[PETOSS-829] Add specific job names
the-chris-mitchell 742f826
[PETOSS-829] Use correct option key
the-chris-mitchell 996aeab
[PETOSS-829] Move spectral into megalinter
the-chris-mitchell 8a063d3
[PETOSS-829] Tidy up file no longer required
the-chris-mitchell f1d9de5
[PETOSS-829] Update megalinter and spectral config
the-chris-mitchell 240ddb8
[PETOSS-829] Rename file
the-chris-mitchell 1ae9e67
[PETOSS-829] Install spectral plugin
the-chris-mitchell 3121e22
[PETOSS-829] Update megalinter config
the-chris-mitchell 6aa3759
[PETOSS-829] Remove actionslint
the-chris-mitchell 438a948
[PETOSS-829] Disable rules
the-chris-mitchell 384192a
Merge branch 'master' of https://github.com/XeroAPI/Xero-OpenAPI into…
the-chris-mitchell be02f96
[PETOSS-829] Only lint OAS files
the-chris-mitchell 6cc7239
[PETOSS-829] Disable rules
the-chris-mitchell 79492f1
[PETOSS-829] Disable flavor suggestions
the-chris-mitchell 70a0f90
[PETOSS-829] Rename package
the-chris-mitchell f089547
[PETOSS-829] Add comments and newlines back in
the-chris-mitchell a56eb31
[PETOSS-829] Remove mention of commitlint
the-chris-mitchell a4820db
[PETOSS-829] Reword note
the-chris-mitchell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import {Octokit} from "@octokit/rest"; | ||
| import {createAppAuth} from "@octokit/auth-app" | ||
|
|
||
| export const getAccessToken = async () => { | ||
|
|
||
| const {GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY} = process.env | ||
|
|
||
| const octoKitInstance = new Octokit({ | ||
| authStrategy: createAppAuth, | ||
| auth: { | ||
| appId: GITHUB_APP_ID, | ||
| privateKey: GITHUB_APP_PRIVATE_KEY | ||
| } | ||
| }); | ||
|
|
||
| const {data: installations} = await octoKitInstance.rest.apps.listInstallations() | ||
|
|
||
| if(!installations.length) { | ||
| throw new Error("No Installations found for this github app") | ||
| } | ||
|
|
||
| const installationId = installations[0].id; | ||
|
|
||
| const installationAccessToken = await octoKitInstance.rest.apps.createInstallationAccessToken({installation_id: installationId}) | ||
|
|
||
| return installationAccessToken.data.token | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "name": "get-access-token", | ||
| "main": "index.js", | ||
| "type": "module", | ||
| "dependencies": { | ||
| "@octokit/auth-app": "^7.1.1", | ||
| "@octokit/rest": "^21.0.2" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "branches": [ | ||
| "master" | ||
| ], | ||
| "tagFormat": "${version}", | ||
| "plugins": [ | ||
| [ | ||
| "@semantic-release/release-notes-generator", | ||
| { | ||
| "preset": "angular", | ||
| "writerOpts": { | ||
| "headerPartial": "## What's changed", | ||
| "footerPartial": "\n**Full Changelog**:https://github.com/XeroAPI/Xero-OpenAPI/compare/{{previousTag}}...{{version}}" | ||
| } | ||
| } | ||
| ], | ||
| "@semantic-release/commit-analyzer", | ||
| "@semantic-release/github", | ||
| "@semantic-release/git" | ||
| ] | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.