Giter Site home page Giter Site logo

github-action-slack-notify-build's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

github-action-slack-notify-build's Issues

Include last commit message

Great extension, I've integrated it into all of our services!

How would you feel about adding an option to show the text of the last commit in one of the fields?

Slack channel name inputs can exhaust rate limit

Yeah this is kind of a major bummer: if you use a channel instead of a channel_id for your message inputs, and your organization has more than a couple hundred channels, it's likely you'll hit your rate limit for the bot token.

This can be resolved by using a channel_id instead. We should add instructions for how to find your channel ID because it's not obvious.

This screenshot might be handy:

Screen Shot 2019-12-04 at 10 58 47 AM

Why Slack does this

I don't know, to be honest. Their conversations API doesn't have a "search for channels" public endpoint. The closest thing to this would be the search.all endpoint, but it doesn't accept bot tokens (only OAuthed user tokens).

Is this repository still maintained?

I am not sure if this repository still brings updates to the codebase or if it accepts pull requests anymore?

My concern is that node16 is going to be deprecated for good soon and I would like to update the deps for my workflows to node20 github actions.

RFE: Use job name instead of workflow name

All messages are posted with the name of the action (github.context.workflow).
If you have a build matrix, that makes it hard to distinguish messages originating from different jobs. It would improve things if the message used the job name (falling back to job id if no name has been set).

I'd supply a PR if I had any idea how to get the current job name from the context, sorry…

Handle pushing git tags

Apparently it's a thing. Not technically broken, but I guess we could identify it as a Tag rather than a Branch.

image

Include the user who triggered an event

My use case would be, to see the user who triggered an event. As an example on a build I'd love to see the username similar to how Travis CI handles its Slack Notifications.

Build #6105 (1187460) of evil_corp/domination by Evan Sparkman passed in 55 min 50 sec

Error when using scheduled triggers: Cannot read property 'owner' of undefined

Hi,

First of all - a great Action! I really like that you can send updates to a single Slack message, this is really awesome...

Long story short: the Action works great when using pull_request trigger, but when I have a scheduled run, I get this:

Screenshot 2019-12-20 11 23 16

The motivation for us in scheduled triggers is to do CI runs regularly (as some components have more free-floating version locks; this is Terraform code :) )

URL for Github Enterprise

This is a pretty nice reusable github actions, great work 👏🏼

I think it would nice if it also supports custom Github URL as an input parameter. This feature will be very useful for GH enterprise users like me.

GHA Matrix values in Slack Message

First off, thanks for building this GitHub Action.
I've quite recently started using it, but it does exactly what it promises.

Now, my projects "Build and Test" GHA uses the strategy.matrix to define two main builds, one for JDK8 and another for JDK11.
However, from the perspective of the Slack messages being published, I simply see two builds for seemingly exactly the same thing. Obviously, this isn't the case, as the former would be JDK8 and the latter JDK11.

Up till now, I haven't found a way to configure this for this GHA.
Am I missing something obvious here, or is this a potential feature on the roadmap?

The action is not automatically inviting the bot to the channel

The action is throwing the not_in_channel error because the app after installation is not invited to the channel. I have to manually invite the bot to the channel and then execute the action.

Mention this thing in the documentation or include this scope in the action.

Single Slack notification

Hi,

I was wondering if it's possible to have a single Slack notification for a failure of a GH Action. I'm currently trying to setup some nightly CI testing. I'm testing on multiple platforms, while using this app is great if a failure occurs I'll get a message for each platform. Below's an example of what this action looks like:

jobs:
  test:
    name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
    runs-on: ${{ matrix.os }}
    continue-on-error: ${{ matrix.version == 'nightly' }}
    strategy:
      fail-fast: false
      matrix:
        version:
          - 1
        os:
          - ubuntu-latest
          - macOS-latest
        arch:
          - x64
        include:
          - os: ubuntu-latest
            version: 1.0.5
            arch: x64
          - os: ubuntu-latest
            version: 1.3
            arch: x64
          - os: ubuntu-latest
            version: nightly
            arch: x64
    steps:
      ...other steps...
      - name: Notify slack fail
        if: failure()
        env:
          SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
        uses: voxmedia/github-action-slack-notify-build@v1
        with:
          channel: nightly-dev
          status: FAILED
          color: danger

Option to remove fields from Slack message

Currently, when I use this action I can't customize which fields are shown in the Slack message (at least it's not documented) and we're always stuck with the fields "Action", "Pull Request", "Status" & "Event". But actually, the "Event" in my use case is always the same, also I don't need the "Action" as it's also always the same and the link isn't needed as the check is shown in the PR link already.

My goal is to make the Slack messages as slim as possible (currently it requires two rows) so it doesn't take too much space in the history. So it would be great if it was possible to somewhow choose which fields we want.

##[error]An API error occurred: not_in_channel

Run voxmedia/[email protected]
with:
channel_id: C8KCLQDDF
status: SUCCESS
color: good
env:
SLACK_BOT_TOKEN: Here is token
(node:4050) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
##[error]An API error occurred: not_in_channel

not_authed error when the pr is opened by dependabot

Hello,

I've set up a workflow that uses your action to send notification to our slack channels.

The action works very well on all pr's except when is opened by github dependabot, for some reason it fails always, here's the log

2021-08-08T22:03:39.7832279Z Found online and idle hosted runner(s) in the current repository's organization account that matches the required labels: 'ubuntu-latest'
2021-08-08T22:03:39.7832335Z Waiting for a hosted runner in 'organization' to pick this job...
2021-08-08T22:03:47.1028911Z Current runner version: '2.279.0'
2021-08-08T22:03:47.1053659Z ##[group]Operating System
2021-08-08T22:03:47.1054490Z Ubuntu
2021-08-08T22:03:47.1054938Z 20.04.2
2021-08-08T22:03:47.1055327Z LTS
2021-08-08T22:03:47.1055796Z ##[endgroup]
2021-08-08T22:03:47.1056343Z ##[group]Virtual Environment
2021-08-08T22:03:47.1056985Z Environment: ubuntu-20.04
2021-08-08T22:03:47.1057488Z Version: 20210803.0
2021-08-08T22:03:47.1058497Z Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20210803.0/images/linux/Ubuntu2004-README.md
2021-08-08T22:03:47.1059809Z Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20210803.0
2021-08-08T22:03:47.1060644Z ##[endgroup]
2021-08-08T22:03:47.1062431Z ##[group]GITHUB_TOKEN Permissions
2021-08-08T22:03:47.1063663Z Actions: read
2021-08-08T22:03:47.1064301Z Checks: read
2021-08-08T22:03:47.1064841Z Contents: read
2021-08-08T22:03:47.1065322Z Deployments: read
2021-08-08T22:03:47.1065942Z Discussions: read
2021-08-08T22:03:47.1066472Z Issues: read
2021-08-08T22:03:47.1066980Z Metadata: read
2021-08-08T22:03:47.1067458Z Packages: read
2021-08-08T22:03:47.1067994Z PullRequests: read
2021-08-08T22:03:47.1068559Z RepositoryProjects: read
2021-08-08T22:03:47.1069181Z SecurityEvents: read
2021-08-08T22:03:47.1069674Z Statuses: read
2021-08-08T22:03:47.1070325Z ##[endgroup]
2021-08-08T22:03:47.1073249Z Prepare workflow directory
2021-08-08T22:03:47.1658502Z Prepare all required actions
2021-08-08T22:03:47.1668276Z Getting action download info
2021-08-08T22:03:47.5570558Z Download action repository 'voxmedia/[email protected]'
2021-08-08T22:03:49.2057247Z Download action repository 'actions/setup-java@v1'
2021-08-08T22:03:49.3454178Z Download action repository 'aws-actions/configure-aws-credentials@v1'
2021-08-08T22:03:49.5251301Z Download action repository 'actions/checkout@v2'
2021-08-08T22:03:49.6841035Z Download action repository 'mikepenz/[email protected]'
2021-08-08T22:03:49.9751443Z ##[group]Run voxmedia/[email protected]
2021-08-08T22:03:49.9752206Z with:
2021-08-08T22:03:49.9752608Z   channel: tech-bit-testing
2021-08-08T22:03:49.9753026Z   status: STARTING
2021-08-08T22:03:49.9753384Z   color: warning
2021-08-08T22:03:49.9753694Z env:
2021-08-08T22:03:49.9754283Z   SLACK_BOT_TOKEN: 
2021-08-08T22:03:49.9754726Z ##[endgroup]
2021-08-08T22:03:50.7116938Z ##[error]Error: An API error occurred: not_authed
2021-08-08T22:03:50.7218265Z ##[group]Run voxmedia/[email protected]
2021-08-08T22:03:50.7218914Z with:
2021-08-08T22:03:50.7219298Z   channel: tech-bit-testing
2021-08-08T22:03:50.7219720Z   status: FAILED
2021-08-08T22:03:50.7220053Z   color: danger
2021-08-08T22:03:50.7220379Z env:
2021-08-08T22:03:50.7220700Z   SLACK_BOT_TOKEN: 
2021-08-08T22:03:50.7221042Z ##[endgroup]
2021-08-08T22:03:50.8844021Z ##[error]Error: An API error occurred: not_authed
2021-08-08T22:03:50.8855933Z Cleaning up orphan processes

Thank you

notify specific user on status

I would like the possibility to notify a specific user in the message that's posted to a channel using the user_id of the specific user.

The use-case is that everyone in the team should see the notification but the one that pushed a failing pipeline should be explicitly notified.

Update setup instructions

There appear to have been some recent changes to Slack API, however, the "Bot users" page mentioned in the setup instructions does not exist any longer. Still, I managed to create a bot, but when running the action, it says "Slack channel <my_channel> could not be found".

Could you maybe provide an up-to-date description of how to set up the bot & how to retrieve the right token? :)

Slack app notifications: No preview available

Hey all,

Great action, I've added to all our builds. Really easy to get going.

One issue I've noticed: The messages have no content, they consist solely of message attachments, so Slack can't generate a preview to put into an OS-level notification. I use OSX, so I can't confirm the behaviour on other platforms.

Thanks again!

Deprication Warning

I get the following error message when I try to use this Github Action

(node:3136) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
##[error]An API error occurred: missing_scope
##[error]Node run failed with exit code 1

Is the v2 tag already meant to be used?

Hi,
I receive renovatebot PR to update from v1 to v2 for this action.
But I see that there's still development going on in v1, respectively v1.5.0.

Is v2 already meant to be used or should I switch to v1.5.0 (and upcoming v1.x versions)?

Thanks in advance,
Johannes

Document OAuth scopes needed

In addition to chat:write (kinda obvious), channels:read and groups:read are needed if channel is used instead of channel_id. Would be nice if documentation explicitly spelled that out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.