Version of your agent: 2.120.2
Repository: Bitbucket
OS of the machine running the agent? Windows
VisualStudio.com
I tried to add a exclude filter for Pull-Request validation, but sadly the CI still trigger the build, i had to cancel these build manually.

Branch filter pattern used

@Davilink i have reported the issue to our product team, and i will post back when i get an update from them.
@Davilink: Do you have the same exclusion setup in the CI trigger as well or just the PR trigger?
Thanks,
Madhuri
Only in the PR Trigger
In the CI trigger i only have the develop branch.
Can you try to add "refs/head/feature-no-ci/*" and see if that works?
It still trigger the build.
Am i suppose to put all the Include rule before the exclude rules ?
What i'm expect is when a branch name match an exclude rule, it should ignore the pull-request.
It should try all Include Rule, if no one match, the PR is ignore otherwise if it match a include Rule, it should check if an exclude rule match, if it's the case, it should ignore the PR otherwise it should trigger a build.
The branch filter is applied to the "target" branch of the PR and not the source branch (which the build summary UI shows). For the PRs where you are seeing the builds getting triggered, can you verify what the target branch is?
The target branch is develop. I didn't thought the filter was on the target branch (The UI wasn't very clear about that). I thought it was on the source branch, but it make sense that that the filter work on the target branch.

Can it's be possible to have a filter on the source branch too ?
Maybe a filter like :
Filter type | Source Branch | Target Branch
Exclude | */no-ci/* | *
Include | * | develop
The reason, is a edited a readme file, and wanted to be approved before being merge in the develop branch, but i didn't want to trigger a build.
@Davilink: I agree the UI is confusing, it is not clear it is the target branch. Can you just exclude "develop" to achieve what you want? Any PRs that target "develop" branch won't get triggered.
@Davilink : I understand now, you don't want any changes in source /no-ci/ to target "develop" to trigger builds. Is that accurate? A better way might be to add a "path filter" so you can exclude the readme from triggering a PR build. That way users don't have to worry about how they name their source branches. We will review and add it to our backlog.
Thanks,
Madhuri
@Davilink: I agree the UI is confusing, it is not clear it is the target branch. Can you just exclude "develop" to achieve what you want? Any PRs that target "develop" branch won't get triggered.
a exclude the develop branch, we will gonna need a integration branch and set the branch filter ton that branch, but the develop branch is our integration branch (but an integration branch for each sprint could work).
@Davilink : I understand now, you don't want any changes in source /no-ci/ to target "develop" to trigger builds. Is that accurate? A better way might be to add a "path filter" so you can exclude the readme from triggering a PR build. That way users don't have to worry about how they name their source branches. We will review and add it to our backlog.
Yes it's exactly that, i don't want to trigger useless build on file that doesn't affect the code.
Where is the "path filter" option that you're talking about ? It could work, but a prefer to be able to exclude source branch too, not only the target branch.
@Davilink: The path filter option is not available for BitBucket repositories. Providing that and/or allowing exclusion of source branch would be new features. We will review and prioritize based on other feature requests we have.
@madhurig - can we create a user voice or feedback item and close out the agent issue? I don't necessarily mind keep agent enhancements around but I think this is service side support? And only if short term (then back to user voice)
@Davilink: Please create a user voice suggestion here: https://visualstudio.uservoice.com/forums/330519-team-services?category_id=145254 to help us prioritize the features.
Thanks,
Madhuri
Voting appears to be closed how can I support this feature request?
@gregelenbaas : The team migrated from using uservoice late last year - https://visualstudio.uservoice.com/forums/330519-azure-devops-formerly-visual-studio-team-services
Announcement: This forum has been migrated to provide you one convenient and responsive system for all feedback. You can now suggest new ideas, browse and vote on existing ideas in the Azure DevOps Developer Community. To learn more about the migration please check out the release blog post
We still view those items but voting has been closed. You could open a feedback ticket and link to it if you wish.
Thanks,
Madhuri
Most helpful comment
@madhurig Done.
https://visualstudio.uservoice.com/forums/330519-visual-studio-team-services/suggestions/33143251-add-filtering-by-source-branch-for-pull-request