Giter Club home page Giter Club logo

runactiononcommit's Introduction

A GitHub app which allow trigger action on issue comment.

This app based on a probot solution.

Usage

Create access configuration file (described at 'Access' section)

Create a workflow

name: 'Triggered from comment'
on:
    repository_dispatch:
        types: [BuildUniqueTitle]

jobs:
        one:
            runs-on: ubuntu-latest
            steps:
                - name: 'Dump GitHub context'
                  env:
                    GITHUB_CONTEXT: ${{ toJson(github) }}
                  run: echo "$GITHUB_CONTEXT"

Add a comment to an issue or a pull request

./sA 'BuildUniqueTitle' [args]

Supports all types of args single/double quoted.

Payload inputs

Name Description
client_payload.pComment Original comment body without ./sA
client_payload The full copy of original payload.

Where to find the id of a comment

How to find the id of a comment will depend a lot on the use case?

Everything can be touched via ${{ github.event.client_payload }} object which contains full copy of context.payload and cleaned comment.body string.

Access

For allowing access to certain groups of users use (bit-) sum of needed value:

Available associations

String Int representation
COLLABORATOR 1
CONTRIBUTOR 2
FIRST_TIMER 4
FIRST_TIME_CONTRIBUTOR 8
MEMBER 16
NONE 32
OWNER 64

For example for allowing running Actions only for OWNER(64) and COLLABORATOR's(1) you should set value to 65 = 1+64.

Append this value to file: .github/.RunActionOnCommitAccess, attention don't add any extra symbols to file.

Value cached for 120s.

Actual link: https://github.com/afwn90cj93201nixr2e1re/RunActionOnCommit/blob/master/DEFAULT_BITS.md

runactiononcommit's People

Contributors

afwn90cj93201nixr2e1re avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.