Skip to content

Instantly share code, notes, and snippets.

@ezzabuzaid
Last active July 30, 2024 07:52
Show Gist options
  • Save ezzabuzaid/57e6042b98a45ba46c396bb1354180f5 to your computer and use it in GitHub Desktop.
Save ezzabuzaid/57e6042b98a45ba46c396bb1354180f5 to your computer and use it in GitHub Desktop.
projectName extensions
HTTP trigger project
core,identity,hono,fly,postgresql,github
export default project(
  feature('products', {
    tables: {
      issues: table({
        fields: {
          title: field({ type: 'short-text'}),
        },
      }),
    },
    workflows: [
      workflow('IssueLabeledWorkflow', {
        tag: 'github',
        trigger: trigger.github({
          event: 'issues.labeled',
        }),
        actions: {
          recordIssue: trigger => action.database.insert({
            table: useTable('issues'),
            columns: [
              useField('title', trigger.issue.title),
            ],
          }),
        },
      });
    ],
  }),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment