probot/stale

Stale bot not working for my repository

poloka opened this issue · 3 comments

Looks like there are numerous issues in here around the stale bot not working on repositories so I'm throwing my hat into the ring as well. I've created a simple docker image to push to kube and I see transactions accepted from the pull requests but I see no actions taken from the bot against the stale pull requests. I understand the usage of actions over this project but there are those who are not running GitHub enterprise versions that yet support actions so would like to see some support on this project.

And to answer the question to whether my .env contains the correct values for running a probot based application, the answer is 'yes' in that my service launches, the index pages is accessible, and I see successful acceptances in the Advanced settings of my bot for the webhook transactions that are being sent to the application.

Here are my configurations:

Dockerfile

FROM node:lts-alpine

# Let's start with some basic stuff.
RUN apk add --no-cache --update \
    curl \
    git \
    docker

WORKDIR /src

COPY package.json package-lock.json /src/
RUN npm install

COPY . /src

EXPOSE 3000
CMD ["npm", "start"]

docker-compose.yml

version: '3'

services:
  probot-stale:
    build: ./
    image: ${IMAGE}:${TAG}
    env_file:
      - ./.env
    ports:
      - 3000:3000
    volumes:
      - ./index.js:/src/index.js
      - ./package.json:/src/package.json
      - ./package-lock.json:/src/package-lock.json

.github/stale.yml

My stale configuration following the example from the readme

# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 30

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 7

# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels: []

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false

# Label to use when marking as stale
staleLabel: stale

# Comment to post when marking as stale. Set to `false` to disable
markComment: >
  This request has been automatically marked as stale because it has not had
  recent activity. It will be closed if no further activity occurs.

# Comment to post when removing the stale label.
# unmarkComment: >
#   Your comment here.

# Comment to post when closing a stale Issue or Pull Request.
closeComment: >
  This request has been automatically closed due to exceeding the allowed
  stale period.  Please open a new request if changes are still needed.

# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

# Limit to only `issues` or `pulls`
only: pulls

# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
pulls:
  daysUntilStale: 30
  markComment: >
    This pull request has been automatically marked as stale because it has not had
    recent activity. It will be closed if no further activity occurs.

# issues:
#   exemptLabels:
#     - confirmed

Is there no longer support for this repository?

I ended up writing a custom workflow using https://github.com/actions/stale for our project, as the stale bot has not been running consistently for at least 2 months.

Feel free to re-use it. 🙂

(GITHUB_TOKEN should have enough privileges to comment and close issues.)

GitHub
Marks issues and pull requests that have not had recent interaction - actions/stale

Thanks @embeddedt but what I'm running into is I'm on GitHub Enterprise Server 2.22.4 so at the moment I cannot use actions. I have my server running finally but because its now a private repository I need it to use a GITHUB_TOKEN when accessing repos. Is that supported in the current stale configuration or was that only introduced in maybe v10 of probot whereas this project is only on v7 of probot?