Skip to content

Conversation

rorychatterton
Copy link

TL;DR

Refactored the action to improve error handling, and ensure that if an action is skipped, it is clear to the customer why it happened.

What changed?

  • Added core.info('Skip: xxx') to functions to clarify what the action did (as it is not easy to see outside debug mode by default).

i.e.
Screenshot 2024-10-16 at 10 07 18 PM

  • Added validation for PR Number, to skip in circumstances the action is unrelated to a PR (such as running on main).

i.e.
Screenshot 2024-10-16 at 10 00 55 PM

  • Split the workflow logic into separate files: config.ts, graphiteService.ts, and main.ts

  • Added TypeScript interfaces for RequestBody and ResponseBody

  • Removed redundant github_token from action input. See action.yml

  • Added Timeout Handling for the Graphite Service Request using controller signals & set max timeout to 5m. See config.ts & graphiteService.ts

  • Updated README to reflect changes in action usage

### TL;DR

Refactored the action to improve error handling, and ensure that if an action is skipped, it is clear to the customer why it happened.

### What changed?
- Split the workflow logic into separate files: `config.ts`, `graphiteService.ts`, and `main.ts`
- Added TypeScript interfaces for `RequestBody` and `ResponseBody`
- Added `core.info('Skip: xxx')` to functions to clarify what the action did (as it is not easy to see outside debug mode by default).
- Added validation for PR Number, to skip in circumstances the action is unrelated to a PR (such as running on main). 
- Removed redundant `github_token` from action input
- Added Timeout Handling for the Graphite Service Request using controller signals & set max timeout to 5m.
- Updated README to reflect changes in action usage
@rorychatterton rorychatterton changed the title Uplifted Github Actions Error Handling Uplifted Github Actions Error Handling, Added Types & Removed Redundant GH Token Input Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant