Skip to content
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

Api key support #84

Merged
merged 10 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
"implicit-arrow-linebreak": "off",
"prefer-object-spread": "off",
"import/no-useless-path-segments": "off",
"import/extensions": "off"
"import/extensions": "off",
"default-param-last": "off",
"prefer-regex-literals": "off"
}
}
13 changes: 8 additions & 5 deletions .github/workflows/CI-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,25 @@ name: CI-pipeline
on:
push:
branches:
- master
- develop
- '!master'
paths-ignore:
- README.md
- CHANGELOG.md
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 18
- name: Clean install of node dependencies
run: npm ci
- name: Install of node dependencies
run: npm install
- name: Run lint
run: npm run lint
- name: Run tests
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 18
- name: Clean install of node dependencies
run: npm ci
- name: Install of node dependencies
run: npm install
- name: Run lint
run: npm run lint
- name: Run tests
Expand All @@ -41,9 +41,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
Expand All @@ -57,7 +57,7 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on:
push:
branches:
- master
paths-ignore:
- '.github/**'
- README.md
- CHANGELOG.md

env:
versionFileName: 'VERSION'
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
### Fixed
- Sending error logs only in cases when the test case has been marked as `failed` by the test runner
### Changed
- `token` configuration option was renamed to `apiKey` to maintain common convention.
- `@reportportal/client-javascript` bumped to version `5.0.12`.
- Readme file updated.

## [5.0.1] - 2023-04-18
### Fixed
Expand Down
174 changes: 92 additions & 82 deletions README.md

Large diffs are not rendered by default.

14 changes: 3 additions & 11 deletions lib/reportportal-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,9 @@ const JasmineReportportalReporter = require('./jasmine-reportportal-reporter.js'
const SpecificUtils = require('./specificUtils');

class ReportportalAgent {
constructor(conf) {
const config = Object.assign(
{
token: '',
endpoint: '',
project: '',
},
conf
);
constructor(config) {
const agentInfo = SpecificUtils.getAgentInfo();
const launchObj = SpecificUtils.getLaunchObj(conf);
const launchObj = SpecificUtils.getLaunchObj(config);
this.client = new RPClient(config, agentInfo);
this.launchInstance = this.client.startLaunch(launchObj);
this.tempLaunchId = this.launchInstance.tempId;
Expand All @@ -40,7 +32,7 @@ class ReportportalAgent {
tempLaunchId: this.tempLaunchId,
attachPicturesToLogs: true,
},
conf
config
);
}

Expand Down
Loading