GitXplorerGitXplorer
I

giphy-generator

public
16 stars
3 forks
9 issues

Commits

List of commits on branch master.
Verified
cbde7ab97cc7fe05dc0dbf59d5f6a782b4919d89

Merge pull request #27 from IAmHughes/revert-26-IAmHughes-patch-1

IIAmHughes committed 8 months ago
Verified
6bbac5a5864688ce1ec8c83efca6d6e23eba5654

Revert "Update README.md"

IIAmHughes committed 8 months ago
Verified
9265489626aa689505d9fa3dfe46164030771f84

Merge pull request #26 from IAmHughes/IAmHughes-patch-1

IIAmHughes committed 8 months ago
Verified
a6a627a13e47d034e169cbbaf6e602f965383e82

Update README.md

IIAmHughes committed 8 months ago
Verified
1bd0bb913564a552148ff826a671039bb6e50470

Merge pull request #20 from IAmHughes/IAmHughes-patch-1

IIAmHughes committed 3 years ago
Verified
e04d17c6e412abe45cc9180aea7654ba2c8c9c1a

Update README.md

IIAmHughes committed 3 years ago

README

The README file for this repository.

GIPHY Generator - GitHub Action.

A GitHub Action (written in JavaScript) to generate a comment on issues and PRs, responding to the command /giphy <search_term>, leveraging the GIPHY API. Powered by GIPHY and GitHub Actions!

For example, if you commented on an Issue and included the phrase /giphy another one, you would see a comment from this action of a gif response from GIPHY's Search API for another one:

/giphy another one

This repo isn't actively maintained, and may contain bugs. PRs welcome, though this was a fun PoC project.

Usage

Pre-requisites

Create a workflow .yml file in your .github/workflows directory. An example workflow is available below. For more information, reference the GitHub Help Documentation for Creating a workflow file.

Inputs

For more information on these inputs, see the GIPHY API Documentation.

  • rating: The content rating used to filter results from the GIF search. Default: g
  • lang: The default language that the search query is in. Default: en for English

Example workflow - giphy generator

When an issue or pull_request has a new comment that contains the /giphy <search_term> phrase (or is opened/edited), and add a comment powered by GIPHY to add a GIF using the given search phrase:

on:
  issues:
    types: [opened, edited]
  pull_request:
    types: [opened, edited]
  issue_comment:
    types: [created, edited]

name: GIPHY Generator

jobs:
  giphy-generator:
    name: GIPHY Generator
    runs-on: ubuntu-latest
    steps:
      - name: GIPHY Generator
        id: giphy_generator
        uses: iamhughes/giphy-generator@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
          GIPHY_TOKEN: ${{ secrets.GIPHY_TOKEN }} # This token should be created on giphy.com: https://developers.giphy.com/dashboard/?create=true
        with:
          rating: 'g'
          lang: 'en'

Contributing

I would love for you to contribute, pull requests are welcome! Please see the CONTRIBUTING.md for more information.

/giphy motivation

License

The scripts and documentation in this project are released under the GNU License

Disclaimer

This leverages the GIPHY API to query results based on inputs you provide and the rating you use. As a consumer of this action, you accept responsibility of any gifs that are posted by this bot. The owner of this action does not control the search algorithm or endpoint that is returning images and is not responsible for it's content.

/giphy challenge accepted