Code Monkey home page Code Monkey logo

Comments (9)

mickahell avatar mickahell commented on June 19, 2024 1

Apparently we can get all of the vars like this :

- name: Dump GitHub context

  env:

       GITHUB_CONTEXT: ${{ toJson(github) }}

  run: echo "$GITHUB_CONTEXT"

https://github.community/t/how-to-find-the-default-variables-for-each-github-action-variable/17162/2

from ecosystem.

mickahell avatar mickahell commented on June 19, 2024

image

from ecosystem.

IceKhan13 avatar IceKhan13 commented on June 19, 2024

@mickahell Do you have a pattern for restrict only authors and admins to trigger action?

from ecosystem.

mickahell avatar mickahell commented on June 19, 2024

@mickahell Do you have a pattern for restrict only authors and admins to trigger action?

For the triggering part I don't know it seems to depend of the setting of the repo

BUT to avoid having lot of same actions with for the same issue in the same time we can use :

concurrency: ci-${{ github.event.issue.title }}
  cancel-in-progress: true

That's way cancel previous action from the same issue

from ecosystem.

mickahell avatar mickahell commented on June 19, 2024

@IceKhan13 did you see my response ?

from ecosystem.

IceKhan13 avatar IceKhan13 commented on June 19, 2024

We do not have a problem that same issue will be triggered, we have a problem that anyone can trigger them =(

I think we can handle this in actions itself, something like

if: ${{github.event.user == github.event.issue.author}} || ${{github.event.user._is_contributor}}

Something like this :)

from ecosystem.

IceKhan13 avatar IceKhan13 commented on June 19, 2024

We will discuss it on tomorrows sync and I'll post here solution we will come up with for transparency

from ecosystem.

mickahell avatar mickahell commented on June 19, 2024

We do not have a problem that same issue will be triggered, we have a problem that anyone can trigger them =(

I think we can handle this in actions itself, something like

if: ${{github.event.user == github.event.issue.author}} || ${{github.event.user._is_contributor}}

Something like this :)

I guess it has a var for _is_contributor but I don't find any :/

from ecosystem.

IceKhan13 avatar IceKhan13 commented on June 19, 2024

Something like that

if: ${{github.event.issue.user.type == "Author"}} || ${{github.event.issue.user.type == "Contributor"}} || ${{github.event.issue.user.type == "Admin"}}

https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issue_comment

from ecosystem.

Related Issues (20)

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.