Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build.author not resolving to expected username #116

Open
sjdrc opened this issue Apr 8, 2021 · 0 comments
Open

build.author not resolving to expected username #116

sjdrc opened this issue Apr 8, 2021 · 0 comments

Comments

@sjdrc
Copy link

sjdrc commented Apr 8, 2021

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.

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

No branches or pull requests

1 participant