Coder Social home page Coder Social logo

Comments (6)

tibdex avatar tibdex commented on May 24, 2024

Hi Romain, I think you're running into this limitation:

With the exception of GITHUB_TOKEN, secrets are not passed to the runner when a workflow is triggered from a forked repository.

Since the run that failed was for a PR coming from a fork.

from autosquash.

romainr avatar romainr commented on May 24, 2024

Interesting, thank you!

So next step would be to see how to avoid the noise.

Those PRs don't have the 'autosquash' label, would there be a way to just output a warning and not fail? (especially if I understand correctly autosquash won't work on PR from forked repo anyway because of the GH limitation)

In general it would be nice to always be green if there is no label anyway cCould also be good to skip on forks if there is a way to detect that if previous it not possible).

What do you think?

from autosquash.

tibdex avatar tibdex commented on May 24, 2024

This issue is not specific to Autosquash so I would rather not add some feature to it to make it a no-op when it detects that it's running on a fork.

You might be able to add another custom action before Autosquash in your workflow to exit it early when it's running on a fork.

from autosquash.

romainr avatar romainr commented on May 24, 2024

Ok, just for information it makes it too noisy to use on repos with a lot of open source activity as even PRs not labeled with 'autosquash' are affected.

from autosquash.

tibdex avatar tibdex commented on May 24, 2024

You can use an if conditional like explained here.

from autosquash.

romainr avatar romainr commented on May 24, 2024

Thanks for the hint, trying it!

Main issue is that it is the other way around:
"The property github.repository of the github context 67 can return name of the repository where the workflow is running."

So will see if there is a way to get the name of the forked repo.

from autosquash.

Related Issues (19)

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.