Giter Site home page Giter Site logo

bob-jung / find-slack-user-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scribd/find-slack-user-action

0.0 0.0 0.0 128 KB

GitHub Action that retrieves a Slack username for the author of the most recent commit (or provided email).

Home Page: https://github.com/scribd/find-slack-user-action

License: MIT License

JavaScript 100.00%

find-slack-user-action's Introduction

Find Slack User Action

GitHub Action that retrieves a Slack username for the author of the most recent commit (or provided email).

Example usage

- name: Find Slack user
  id: find-slack-user
  uses: scribd/find-slack-user-action@v1
  with:
    slack-token: ${{ secrets.SLACK_API_TOKEN }}

- name: Print Slack user
  run: echo "${{ steps.find-slack-user.outputs.username }}"

- name: Mention the user in Slack
  uses: archive/[email protected]
  with:
    slack-function: send-message
    slack-bot-user-oauth-access-token: ${{ secrets.SLACK_API_TOKEN }}
    slack-channel: ABC123
    slack-text: |
      "Hello, <@${{ steps.find-slack-user.outputs.member-id }}>!"

Inputs

email

Required The email to convert to slack user. Defaults to whomever pushed the last commit

slack-token

Required The Slack API token.

default-username

The username to use if the email address does not match a Slack user.

default-member-id

The member ID to use if the email address does not match a Slack user.

include-at-symbol

Include @ as a prefix to the found user. Defaults to false

Outputs

username

The retrieved Slack username.

member-id

The retrieved Slack user's member ID. This is what you'll use to mention your user:

Hey <@U024BE7LH>, thanks for submitting your report.

found-user

Boolean indicating if a matching Slack username was found.

Permissions

You'll need to provide the following permissions for the slack bot:

find-slack-user-action's People

Contributors

bob-jung avatar jim80net avatar justanotherdev avatar kamranf avatar rtyler avatar shaunbennett avatar

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.