Skip to content

Commit

Permalink
update specs
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanmacfarlane committed May 17, 2019
1 parent a97380e commit 792122b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 41 deletions.
2 changes: 1 addition & 1 deletion docs/package-specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function getInput(name: string, options?: InputOptions): string | undefin
* sets the status of the action to neutral
* @param message
*/
export function setFailed(message: string): void
export function setNeutral(message: string): void
/**
* sets the status of the action to failed
Expand Down
66 changes: 26 additions & 40 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,60 +5,46 @@
## Usage

```
//-----------------------------------------------------------------------
// Variables, Inputs and Outputs
//-----------------------------------------------------------------------
// Logging functions
export function debug(message: string): void
export function warning(message: string): void
export function error(message: string): void
/**
* sets env variable for this action and future actions in the job
* @param name the name of the variable to set
* @param val the value of the variable
*
* @param name the name of the variable to set
* @param val the value of the variable
* @param options optional. See ExportOptions.
*/
export function exportVariable(name: string, val: string);
export function exportVariable(name: string, val: string): void
/**
* registers a secret which will get masked from logs
* @param val value of the secret
* Interface for getInput options
*/
export function setSecret(name: string, val: string);
// TODO: follow up and see if we need anything for outputs
//-----------------------------------------------------------------------
// Results
//-----------------------------------------------------------------------
/**
* Sets the action status to neutral
*/
export function setNeutral();
/**
* Sets the action status to failed.
* When the action exits it will be with an exit code of 1
* @param message add error issue message
*/
export function setFailed(message: string);
//-----------------------------------------------------------------------
// Logging Commands
//-----------------------------------------------------------------------
export interface InputOptions {
/** Optional. Whether the input is required. If required and not present, will throw. Defaults to false */
required?: bool;
}
/**
* Writes debug message to user log
* @param message debug message
* Gets the value of an input. The value is also trimmed.
*
* @param name name of the input to get
* @param options optional. See InputOptions.
* @returns string
*/
export function debug(message: string);
export function getInput(name: string, options?: InputOptions): string | undefined
/**
* Adds an error issue
* @param message error issue message
* sets the status of the action to neutral
* @param message
*/
export function error(message: string);
export function setNeutral(message: string): void
/**
* Adds an warning issue
* @param message warning issue message
* sets the status of the action to failed
* @param message
*/
export function warning(message: string);
export function setFailed(message: string): void
```

0 comments on commit 792122b

Please sign in to comment.