Giter Club home page Giter Club logo

trello-link-github-action's Introduction

Trello Link GitHub Action

Latest Release

View on the GitHub Marketplace

Trello has a Power-Up to link GitHub commits, pull requests, branches, or issues to a card, however, this must be done manually. This action allows you to link a commit, pull request, or issue to a Trello card automatically by using Trello card identifiers in a commit message, pull request title or body, or issue title or body.

The Trello card id, shortLink, or idShort may be used in the tag. The idShort (ie, card number) is the easiest to use (in my opinion), assuming you use the Card Number plugin as described here.

Usage

GitHub Repository Action

In your repository, create an action workflow with the following step:

- name: Link to Trello
  uses: kagof/[email protected]
  with:
    # Required.
    # Allowed to be one of the following:
    # 1. the board name
    # 2. the board shortLink (can be found in the URL)
    # 3. the boardId (can be found via the Trello REST API)
    board-identifier: "${{ secrets.BOARD_IDENTIFIER }}"
    # Required
    # Secret token used to contact Trello
    trello-token: "${{ secrets.TRELLO_TOKEN }}"
    # Optional (default 'TRELLO-')
    # When preceding a string in a commit message or PR body or title,
    # indicates that the string is a Trello shortId.
    # May be either:
    # 1. an alpha string, eg TRELLO
    # 2. an alpha string followed by a dash, eg TRELLO-
    # 3. one of the characters ! @ # $ % ^ & * + = (note: must be exactly 1 char long)
    marker: 'TRELLO-'

This action may be triggered on commits, pull requests, or issues.

Token

A Trello token is required for this action. To generate it, visit https://trello.com/1/authorize?response_type=token&scope=read,write&name=Trello+Link+GitHub+Action+Token&expiration=never&key=09045f0c83d151e8d48ec9feb99e78ae in your browser, or adjust the name and expiration parameters in this URL to your liking.

KEEP THIS TOKEN SECRET. It can be used to change or read data on any of the Trello boards you have access to. You should add it as a secret in your repository.

You may revoke this token at any time from your account settings page in Trello.

Trello Board

In your Trello board, it is recommended that you add the following Power-Ups:

  1. Card Numbers by Reenhanced - this lets you easily see the Trello card's shortId.
  2. GitHub - this completes the integration with Trello

After doing so and properly configuring them, your cards will look something like this:

Example Card

Note the #19 - this is the Trello shortId for this card.

Commits, Pull Requests, and Issues

When opening commits, put your tag anywhere in the commit message. When opening pull requests or issues, place it anywhere in your title or body.

As long as there is a word break, your tag will be picked up. If your marker is a special character, the word break is not necessary. Multiple tags are allowed. Tags can use the card id, idShort, or shortLink.

For Example, if your marker is TRELLO-:

Valid

  • TRELLO-19 fixes that problem
  • TRELLO-19: fixes that problem
  • TRELLO-1234567890abcdefg1234567 using the card ID
  • TRELLO-AbcDeFga using the card shortLink
  • fixes TRELLO-19 and TRELLO-18
  • fix/TRELLO-19-fix-the-stuff
  • TRELLO-19,TRELLO-18

Invalid

  • fixTRELLO-19
  • TRELLO-19fixes

Known Shortcomings

  • If this action runs on a pull request, the commits in the PR are not considered during the run. This can be worked around by running the action on commits as well.
  • Branch are not (yet?) considered

trello-link-github-action's People

Watchers

 avatar  avatar

Forkers

el-iot lorenzk

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.