tektoncd / tektoncd/pipelines-as-code

Trigger PipelineRun on opening/closing PR

Open
#1,398 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug feature priority/medium
Dominant language
Go
Stars
214
Forks
144
Avg merge
2d 11h
Merged PRs (30d)
27

Description

Currently PipelinRuns targeting the pull_request event are triggered every time a commit occurs on a pull_request. However, we'd like to be able to trigger a PipelineRun only when a PR is opened or closed and no longer on the commits to the pull request.
One way to achieve this behavior is to use GitHub workflows to start the PipelineRun by sending a CURL request (https://pipelinesascode.com/docs/guide/incoming_webhook/). Unfortunately, we can't set the branch name to any name, since the Repository resource doesn't allow wildcards for the incoming target branch name and constantly updating the Repository resource is not favorable.

Would it be possible to either support wildcards for the incoming target branch name in the Repository resource, or to extend the events or cel expressions to include events for opening/closing PRs?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the incoming webhook documentation linked in the issue and the Repository resource behavior for incoming target branch names. Determine whether the change should support wildcard branches or expose pull-request opening and closing events in event or CEL handling; done means one of these behaviors is supported without repeatedly updating the Repository resource.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, go
Domain
ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.