mirror of
https://github.com/jlengrand/push-adyen-collections-to-postman-javascript-action.git
synced 2026-03-10 08:41:23 +00:00
Finishes preparing the action
This commit is contained in:
5
.github/workflows/sampletest.yml
vendored
5
.github/workflows/sampletest.yml
vendored
@@ -21,7 +21,4 @@ jobs:
|
||||
with:
|
||||
postman-key: ${{ secrets.POSTMAN_API_KEY }}
|
||||
workspace-id: ${{ secrets.POSTMAN_WORKSPACE_ID }}
|
||||
files-changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}
|
||||
# Use the output from the `hello` step
|
||||
- name: Get the output time
|
||||
run: echo "The time was ${{ steps.process.outputs.time }}"
|
||||
files-changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}
|
||||
@@ -1,5 +1,5 @@
|
||||
name: 'Push Adyen Collections to Postman '
|
||||
description: 'Greet someone and record the time'
|
||||
description: 'Takes the list of changed files and pushes them to Postman in the given workspace, by either updating or creating new collections.'
|
||||
inputs:
|
||||
postman-key:
|
||||
description: 'Postman API Key'
|
||||
@@ -10,9 +10,6 @@ inputs:
|
||||
files-changed:
|
||||
description: 'Files changed'
|
||||
required: true
|
||||
outputs:
|
||||
time: # id of output
|
||||
description: 'The time we greeted you'
|
||||
runs:
|
||||
using: 'node16'
|
||||
main: 'dist/index.js'
|
||||
7135
dist/index.js
vendored
7135
dist/index.js
vendored
File diff suppressed because one or more lines are too long
17
index.js
17
index.js
@@ -1,18 +1,14 @@
|
||||
import * as core from '@actions/core';
|
||||
import * as github from '@actions/github';
|
||||
import * as postman from './postmanLibrary.js';
|
||||
import * as utils from "./utils.js";
|
||||
|
||||
async function run() {
|
||||
|
||||
try {
|
||||
const postmanApiKey = core.getInput('postman-key');
|
||||
const filesChanged = core.getInput('files-changed');
|
||||
const workspaceId = core.getInput('workspace-id');
|
||||
|
||||
const time = runParameters(postmanApiKey, workspaceId, filesChanged);
|
||||
|
||||
// TODO : Change output to something better. Is there any output actually?
|
||||
core.setOutput("time", time);
|
||||
|
||||
} catch (error) {
|
||||
@@ -71,10 +67,13 @@ export async function runParameters(postmanApiKey, workspaceId, filesToProcess){
|
||||
console.log(`No action for ${api.name}. Shouldn't happen!`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return (new Date()).toTimeString();
|
||||
console.log("Finished processing files!");
|
||||
}
|
||||
|
||||
|
||||
run()
|
||||
run()
|
||||
.then( _ => {
|
||||
console.log("Finished action!");
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user