This repository was archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
RunBefore and RunAfter #19062
Copy link
Copy link
Open
Labels
Description
Problem
When I run a campaign spec, there are some things I want to do before (setup) and after (cleanup, message passing).
One way is to build a wrapper around the CLI (great!).
For smaller use cases, having something builtin might be helpful.
For example:
Before
- Check that environment variables are set (eg. with token) before running the spec
- Check that other systems are ready (eg. a Jira server is attainable)
After - start a script that links tickets with the PRs I have created
- clean up errors (eg. creating a Jira ticket failed due to permission errors)
Solution
This section is a dump of thoughts, not necessarily the right solution.
- Have
runAfterandrunBeforein the campaign spec, that allows you to trigger something else. This could trigger setup scripts locally, and cleanup or messaging script. - Have an eventHook on the sourcegraph instance, that sends the status of the PR, as described here Add
batch-change.nameto changeset templating src-cli#487 (comment)