Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 19, 2025

What this PR does / why we need it:

Migrates stale issue/PR management from the deprecated stale bot app to the official actions/stale GitHub Action (v10.1.0). The stale bot app is no longer maintained and GitHub recommends using the Actions-based approach.

  • Removes .github/stale.yml (bot app config)
  • Adds .github/workflows/stale.yaml (Actions workflow)
  • Preserves all existing behavior: 60-day stale threshold, 14-day close threshold, exempt labels (pinned, security, triaged)
  • Adds stale PR management (previously only handled issues)
  • Uses actions/[email protected] with SHA-pinned commit hash
  • Runs daily via cron schedule
  • Follows repo conventions: ubuntu-22.04 runner, security hardening with step-security/harden-runner

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #4202

Special notes for your reviewer:

The workflow will not run until manually enabled or the first scheduled execution. Configuration is a direct 1:1 mapping from the old stale bot settings.

Original prompt

This section details on the original issue you should resolve

<issue_title>migrate to stale action</issue_title>
<issue_description>Describe the solution you'd like
stale bot app is deprecated, migrate to use stale action
https://github.com/actions/stale

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • Gatekeeper version:
  • Kubernetes version: (use kubectl version):</issue_description>

<agent_instructions>Figure out a way to migrate to stale github action from stale bot app.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Nov 19, 2025
Copilot AI changed the title [WIP] Migrate from stale bot app to stale action chore: migrate from deprecated stale bot app to GitHub Actions stale action Nov 19, 2025
Copilot AI requested a review from JaydipGabani November 19, 2025 19:42
Copilot finished work on behalf of JaydipGabani November 19, 2025 19:42
Copy link
Contributor

@JaydipGabani JaydipGabani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot address the feedback

with:
egress-policy: audit

- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use commit for 10.1.0 tag and update the comment accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to use the commit hash for v10.1.0 tag (5f858e3) and updated the comment accordingly in commit 7477b86.

Copilot AI requested a review from JaydipGabani November 20, 2025 02:35
Copilot finished work on behalf of JaydipGabani November 20, 2025 02:35
@JaydipGabani JaydipGabani requested a review from Copilot November 20, 2025 19:24
Copilot finished reviewing on behalf of JaydipGabani November 20, 2025 19:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates stale issue and PR management from the deprecated stale bot app to the official GitHub Actions actions/stale workflow, as GitHub no longer maintains the bot app.

Key Changes:

  • Replaces app-based configuration (.github/stale.yml) with GitHub Actions workflow (.github/workflows/stale.yaml)
  • Extends stale management to include pull requests (previously only handled issues)
  • Uses SHA-pinned action versions with security hardening via step-security/harden-runner

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/stale.yaml New GitHub Actions workflow implementing stale issue/PR management with daily cron schedule, preserving all previous configuration values (60-day stale threshold, 14-day close threshold, exempt labels)
.github/stale.yml Removed deprecated stale bot app configuration file

@JaydipGabani
Copy link
Contributor

@JaydipGabani JaydipGabani marked this pull request as ready for review November 25, 2025 16:49
@JaydipGabani JaydipGabani requested a review from a team as a code owner November 25, 2025 16:49
@JaydipGabani
Copy link
Contributor

This action works for proof checkout closed issues and pr here - https://github.com/JaydipGabani/gatekeeper/issues


- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
with:
days-before-stale: 90
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep 60?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, for some reason I thought we have 90 days as stale mark. Changed it to 60 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

migrate to stale action

3 participants