Skip to content

Add middlewares support to pipeline HTTP trigger config#185

Merged
intel352 merged 3 commits intomainfrom
copilot/add-middlewares-support-http-triggers
Feb 27, 2026
Merged

Add middlewares support to pipeline HTTP trigger config#185
intel352 merged 3 commits intomainfrom
copilot/add-middlewares-support-http-triggers

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

Pipeline HTTP triggers only forwarded path and method to route registration, making it impossible to apply middleware (auth, rate-limit, etc.) to pipeline-triggered routes without reimplementing auth as custom pipeline steps.

Changes

  • plugins/http/plugin.go: Forward middlewares field in PipelineTriggerConfigWrappers alongside existing path and method passthroughs
  • plugins/http/plugin_test.go: Add TestPipelineTriggerConfigWrappers covering forwarding and omission cases

Pipeline triggers can now reference middleware modules identically to explicit workflows.http.routes:

pipelines:
  list-items:
    trigger:
      type: http
      config:
        path: /items
        method: GET
        middlewares: [auth-bearer, rate-limit]
    steps:
      - name: parse
        type: step.request_parse

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…pper

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for middlewares in pipeline HTTP triggers Add middlewares support to pipeline HTTP trigger config Feb 27, 2026
@intel352 intel352 marked this pull request as ready for review February 27, 2026 03:41
Copilot AI review requested due to automatic review settings February 27, 2026 03:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables pipeline HTTP triggers to apply the same per-route middleware chain available to explicit workflows.http.routes, by forwarding the middlewares field through the pipeline trigger config wrapper.

Changes:

  • Forward middlewares from flat pipeline HTTP trigger config into the generated route config.
  • Add unit tests validating middlewares forwarding and omission behavior for the wrapper.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
plugins/http/plugin.go Extends the HTTP pipeline trigger config wrapper to pass through middlewares into the generated route.
plugins/http/plugin_test.go Adds coverage ensuring middlewares is forwarded when provided and omitted when absent.

@intel352 intel352 merged commit 5767cf0 into main Feb 27, 2026
18 checks passed
@intel352 intel352 deleted the copilot/add-middlewares-support-http-triggers branch February 27, 2026 03:50
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.

3 participants