kotlin-sdk/.github/workflows
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Konstantin Pavlov 52a0ec3b8f
ci: enhance stale issue/PR workflow (#522)
# ci: enhance stale issue/PR workflow

- Split stale workflow into marking and closing jobs
- Add dry-run mode input and environment variables
- Improve configuration for timing, messages, and operations per run

## Motivation and Context
To mark and close stale issues/PRs automatically

## How it works

The automations.yml workflow automates the lifecycle of inactive issues
and pull requests using a two-stage process. It is scheduled to run
daily at 2:00 AM UTC and supports manual execution with a dry-run
option.


### 1. Marking Phase (mark-stale job)
This job identifies inactive items and labels them as stale without
closing them.
  - Criteria: Any issue or PR with no activity for 30 days.
  -  Action: Adds the stale label and posts a notification comment.
  - Exemptions:
    - Draft PRs are ignored.
- Issues labeled with awaiting-approval or work-in-progress are ignored.

- Recovery: If a contributor updates the item, the stale label is
automatically removed.
- Safety: This job is explicitly configured never to close items
(days-before-*-close: -1).

### 2. Closing Phase (close-stale job)

This job handles the final closure of items that have remained inactive
after being marked.

- Criteria: Only targets items that already have the stale label and
have seen no further activity for 15 days.
- Action: Closes the issue or PR and posts a final closure message.
- Safety: This job is explicitly configured never to mark new items
(days-before-*-stale: -1).

### Global Configuration
- Dry Run: Controlled by the DRY_RUN variable. When true, the bot logs
planned actions in the workflow output but does not actually apply
labels, post comments, or close items.
- Throttling: Processes up to 100 items per run to avoid hitting GitHub
API rate limits.
- Permissions: Requires write access to issues and pull requests to
perform its actions.


## How Has This Been Tested?
[Manually tested on
CI](https://github.com/modelcontextprotocol/kotlin-sdk/actions/runs/21984701285)
with dry run

## Breaking Changes
No

## Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [x] Workflow update

## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [ ] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [ ] My code follows the repository's style guidelines
- [ ] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed

## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->
2026-02-13 15:21:29 +02:00
..
apidocs.yaml docs: Update readme, enable Knit (#162) (#510) 2026-02-06 18:40:31 +02:00
automations.yml ci: enhance stale issue/PR workflow (#522) 2026-02-13 15:21:29 +02:00
build.yml docs: Update readme, enable Knit (#162) (#510) 2026-02-06 18:40:31 +02:00
codeql.yml ci: integrate Detekt static analysis tool (#493) 2026-01-26 19:02:22 +02:00
conformance.yml fix conformance tests (#483) 2026-01-19 15:45:54 +02:00
gradle-publish.yml ci: Update gradle-publish.yml 2026-01-21 12:12:01 +02:00
samples.yml Bump actions/upload-artifact from 5 to 6 (#465) 2026-01-10 00:52:06 +02:00