Skip to content

Changed files wrong due to inclusion of merge commits  #35

@dillydill123

Description

@dillydill123

I'm using the changed files as so:

jobs:
  - job: check_changed_files
    displayName: Check changed files
    steps:
      - checkout: self
        fetchDepth: "0"
      - task: ChangedFiles@1
        name: check_changed_files_task
        inputs:
          ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
            refBranch: $(System.PullRequest.TargetBranch)
          rules: |
            [DocsChanged]
            arch/doc/**
            [ArchitectureChanged]
            **/*.yaml

In the case where it is not a pull request, i.e. a merge happens to develop. I noticed it is including a lot more files. I think what's occurring is that users who merge develop into their feature branch, then merge their feature branch back into develop have this issue. These merge commits are checked with the git log command to see which files changed, producing more files changed.

Does this seem like the current behavior? Or am I using the extension wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions