Skip to content

build.author not resolving to expected username #116

@sjdrc

Description

@sjdrc

I have the following pipeline:

  - name: notify
    image: plugins/slack
    settings:
      webhook:
        from_secret: slack_webhook_url
      link_names: true
      template: >
        {{#if build.pull }}
          *{{#success build.status}}✔{{ else }}✘{{/success}} {{ uppercasefirst build.status }}*: <https://URL/{{ repo.owner }}/{{ repo.name }}/pulls/{{ build.pull }}|Pull Request #{{ build.pull }}>
        {{else}}
          *{{#success build.status}}✔{{ else }}✘{{/success}} {{ uppercasefirst build.status }}: Build #{{ build.number }}* (type: `{{ build.event }}`)
        {{/if}}

        Commit: <https://URL/{{ repo.owner }}/{{ repo.name }}/commit/{{ build.commit }}|{{ truncate build.commit 8 }}>
        
        Branch: <https://URL/{{ repo.owner }}/{{ repo.name }}/commits/{{ build.branch }}|{{ build.branch }}>
        
        Author: <@{{ build.author }}>
        
        <{{ build.link }}|Visit build page ↗>

However, in slack the author of the PR is always mentioned, rather than the author of the most recent commit. Is this intended behaviour? The documentation states that it should be git author for current commit.

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