Skip to content

Commit

Permalink
Merge pull request #9 from ilhamsyahids/releases/v1.1.0
Browse files Browse the repository at this point in the history
Releases v1.1.0
  • Loading branch information
ilhamsyahids authored Sep 14, 2024
2 parents c344ec3 + 84bfdd1 commit 2fc26e2
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist/
node_modules/
coverage/
coverage/
CHANGELOG.md
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.1.0] - 2024-09-14

### Fixed

- Missing mention condition when `mention_if` invalid [#7].
- Handle Slack throw error when sending message [#8].

### Added

- Add unit test for all existing functions [#8].
- Add coverage information to the project [#5].
- Update README.md with new example and documentation [#4] [#8].
- Add proper project description and metadata [#8].

### Changed

- Default token to `${{ github.token }}` [#4].

### Removed

- Remove `SLACK_WEBHOOK` environment usage, use `url` input on `with` instead [#4].

## [1.0.0] - 2024-09-05

First release of `slackify` action, a GitHub Action to send a notification to Slack [#2].

### Added

- Notify result of GitHub Actions job to Slack Webhook, including detail of github context and commit information.
- Mention to channel members with condition.

[#8]: https://github.com/ilhamsyahids/slackify/pull/8
[#7]: https://github.com/ilhamsyahids/slackify/pull/7
[#5]: https://github.com/ilhamsyahids/slackify/pull/5
[#4]: https://github.com/ilhamsyahids/slackify/pull/4
[#2]: https://github.com/ilhamsyahids/slackify/pull/2

[Unreleased]: https://github.com/ilhamsyahids/slackify/compare/v1.1.0...HEAD
[1.1.0]: https://github.com/ilhamsyahids/slackify/releases/tag/v1.1.0
[1.0.0]: https://github.com/ilhamsyahids/slackify/releases/tag/v1.0.0
56 changes: 44 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
![Check `dist/`](https://github.com/ilhamsyahids/slackify/actions/workflows/check-dist.yml/badge.svg)
[![CI](https://github.com/ilhamsyahids/slackify/actions/workflows/ci.yml/badge.svg)](https://github.com/ilhamsyahids/slackify/actions/workflows/ci.yml)

[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-v1-undefined.svg?logo=github&logoColor=white&style=flat)](https://github.com/marketplace/actions/slackify-notification)
[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-v1.1.0-undefined.svg?logo=github&logoColor=white&style=flat)](https://github.com/marketplace/actions/slackify-notification?version=v1.1.0)
[![Release](https://img.shields.io/github/v/release/ilhamsyahids/slackify?color=brightgreen)](https://github.com/ilhamsyahids/slackify/releases)
[![Coverage](https://codecov.io/gh/ilhamsyahids/slackify/branch/main/graph/badge.svg)](https://codecov.io/gh/ilhamsyahids/slackify)
![License](https://img.shields.io/github/license/ilhamsyahids/slackify?color=brightgreen)

This is Slack Notification Action.

## Disclaimer
## Background

This repository is a fork of the original
[lazy-actions/slatify](https://github.com/lazy-actions/slatify) repository. The
Expand All @@ -20,27 +20,30 @@ Therefore, we have decided to create new Action to ensure that the feature
remains available and up-to-date.

This new Action retains the core functionality of the original while
incorporating updated dependencies and implementing minor adjustments to align
with recent changes in the GitHub Actions environment, such as
incorporating updated dependencies, fixing some issues, and implementing minor
adjustments to align with recent changes in the GitHub Actions environment, such
as
[this update](https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/).

## Table of Contents

- [Slacktify](#slacktify)
- [Disclaimer](#disclaimer)
- [Background](#background)
- [Table of Contents](#table-of-contents)
- [Feature](#feature)
- [Inputs](#inputs)
- [Examples](#examples)
- [Basic usage](#basic-usage)
- [Mention if failure](#mention-if-failure)
- [Includes commit information](#includes-commit-information)
- [Legacy Information](#legacy-information)
- [Override default token](#override-default-token)
- [Slack UI](#slack-ui)
- [LICENSE](#license)

## Feature

- Notify the result of GitHub Actions
- Notify the result of GitHub Actions to Slack
- Support three job status (reference:
[job-context](https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions#job-context))
- `success`
Expand Down Expand Up @@ -75,27 +78,57 @@ Please refer to [action.yml](./action.yml) for more details.

```yaml
- name: Slack Notification
uses: ilhamsyahids/slackify@v1
uses: ilhamsyahids/slackify@v1.1.0
if: always()
with:
type: ${{ job.status }}
job_name: '*Test*'
channel: '#random'
url: ${{ secrets.SLACK_WEBHOOK }}
```
### Mention if failure
```yaml
- name: Slack Notification
uses: ilhamsyahids/[email protected]
if: always()
with:
type: ${{ job.status }}
job_name: '*Lint Check*'
mention: 'here'
mention_if: 'failure' # Mention if job status is failure
url: ${{ secrets.SLACK_WEBHOOK }}
```
### Includes commit information
```yaml
- name: Slack Notification
uses: ilhamsyahids/slackify@v1
uses: ilhamsyahids/[email protected]
if: always()
with:
type: ${{ job.status }}
job_name: '*Lint Check*'
mention: 'here'
mention_if: 'failure'
url: ${{ secrets.SLACK_WEBHOOK }}
commit: true # Include commit information
```
### Legacy Information
```yaml
- name: Slack Notification
uses: ilhamsyahids/[email protected]
if: always()
with:
type: ${{ job.status }}
job_name: '*Lint Check*'
mention: 'here'
mention_if: 'failure'
channel: '#random'
icon_emoji: ':github:' # Slack icon
username: 'GitHub Actions' # Slack username
channel: '#general' # Slack channel
url: ${{ secrets.SLACK_WEBHOOK }}
commit: true
```
Expand All @@ -104,14 +137,13 @@ Please refer to [action.yml](./action.yml) for more details.
```yaml
- name: Slack Notification
uses: ilhamsyahids/slackify@v1
uses: ilhamsyahids/slackify@v1.1.0
if: always()
with:
type: ${{ job.status }}
job_name: '*Lint Check*'
mention: 'here'
mention_if: 'failure'
channel: '#random'
url: ${{ secrets.SLACK_WEBHOOK }}
commit: true
token: ${{ secrets.PRIVATE_TOKEN }} # Override default token
Expand Down

0 comments on commit 2fc26e2

Please sign in to comment.