Code Monkey home page Code Monkey logo

fresh-bot's People

Contributors

dependabot[bot] avatar gomorizsolt avatar thisismydesign avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fresh-bot's Issues

TypeError: Cannot destructure property `login` of 'undefined' or 'null'.

hi, thanks your fresh-bot tools, but when I configured it, it reported an error:

TypeError: Cannot destructure property `login` of 'undefined' or 'null'.

This is my fresh-bot.yml:

name: Bump stale issues


on:
  schedule:
    # Run every minute
    - cron: '* * * * *'
  push:
    branches: [ master ]


jobs:
  fresh-bot:
    runs-on: ubuntu-latest


    steps:
      - name: Bump stale issues
        uses: c-hive/fresh-bot@v1
        with:
          GITHUB_TOKEN: ${{ secrets.FRESH_BOT_TOKEN }} # Needs `repo` scope

The FRESH_BOT_TOKEN() is set in https://github.com/Alanwang2015/Actions-Fresh-bot , and it's value is copied from global Personal access token, what did I wrong?

Error: TypeError: Cannot read property 'groups' of null

This is consistently failing as defined in https://github.com/GiovanH/actions/blob/main/.github/workflows/fresh-bot.yml, using the master branch. (It also fails with the v1 tag.)

Found stale bot comment https://api.github.com/repos/julmot/mark.js/issues/comments/1232336903 on issue https://api.github.com/repos/julmot/mark.js/issues/479
Error: TypeError: Cannot read property 'groups' of null

It looks like it's silently failing to fetch the commentParams object here:

const commentParams = commentUrlParamsRegex.exec(subjectUrl);

Automatic triggers

Use periodic actions to automatically trigger notification checks

  • would this work in forks?
  • need to setup client id and secret is secrets (would hopefully work automatically like this, but not sure)

App-style MVP

The motivation to create an app was that it would be nice if the comment could be written by an app instead of the specific users.

AFAIR there were some issues with this (don't take these as 100% accurate, just what I recall from a year ago). "Regular" apps have to be installed on a repo and can comment on that specific repo only. OAuth apps would have access to users' notifications and could even post but require a running deployment that keeps track of oauth tokens (there could still be an issue with public vs private repos).

Finally looking at where things are headed it seems reasonable to move towards Actions instead. Therefore see #5

Switch to GitHub Actions

The initial MVP was planned to be a GitHub app using Probot and exposing an endpoint to trigger the check. Actions allow us to greatly simplify this.

MVP flow:

  • create a personal repo for running periodic actions
  • set personal access token as a secret for the repo
  • run this action periodically
  • this action uses the personal access token to fetch notifications and checks for comments by stale bots (as it already does)
  • it replies automatically when there isn't a follow-up reply yet

Existing code can definitely be refactored. Repo must be set up based on https://github.com/c-hive/js-boilerplate.

https://github.com/c-hive/gha-remove-artifacts is a good base for stealing some code ;)

Need to make sure personal access token is enough to read notifications & write comments.

For the old app-style approach see: #6 and master@55e8b86dbcbc7223bc4cdb1511657a446797d52d

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.