Skip to content

Allow option to exclude weekends from total time #564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cschear opened this issue Sep 12, 2021 · 9 comments · May be fixed by #1219
Closed

Allow option to exclude weekends from total time #564

cschear opened this issue Sep 12, 2021 · 9 comments · May be fixed by #1219
Labels
enhancement New feature or request Stale

Comments

@cschear
Copy link

cschear commented Sep 12, 2021

The problem

We would like to keep the total time open pretty low - but weekends cause items to be flagged early. For example we would like it to be 3 weekdays - but currently a PR opened on Friday would be stale on Monday.

The solution

Allow an option to exclude weekends from the total time open.

@cschear cschear added the enhancement New feature or request label Sep 12, 2021
@cschear
Copy link
Author

cschear commented Sep 12, 2021

Maybe using something like this:
https://stackoverflow.com/a/21465288

@luketomlinson
Copy link
Collaborator

Hi @cschear thanks for opening an issue. I am not sure that such a specific special case is the best path forward for this action. My worry is that once we start special casing for weekends it might spiral into many special cases (weekends, holidays, leap years, etc).

That being said, I'll leave this issue open for a bit to see if there is a larger desire for this feature and maybe we can reevaluate if there is a large demand for this feature.

@rkdrnf
Copy link

rkdrnf commented Oct 14, 2021

Also need this feature. We also trying to maintain low stale time (2 or 3days) but because of weekends counted, we are using 4 days instead now.

Counting holidays as working days wouldn't much matter because those are relatively rare cases.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@shreyasbharath
Copy link

Can we revive this please? It's a pretty basic use case

@irm-codebase
Copy link

I think this should be re-considered. At least weekends. It's absolutely crucial for most companies or projects in order to avoid mistakes.

@charleseasyvest
Copy link

I also vote for this feature

@samgdotson
Copy link

Seems like it should be the default.

@whartley94
Copy link

whartley94 commented Oct 30, 2024

Bump. I vote!

alpaca-tc added a commit to alpaca-tc/stale that referenced this issue Mar 7, 2025

Unverified

This user has not yet uploaded their public signing key.
Fixed actions#564

Add support for excluding specific weekdays when calculating elapsed days for stale issues and PRs. This is particularly useful for organizations that want to consider only business days.

- Add new `exclude-weekdays` option to specify which days to exclude (0-6, where 0 is Sunday)
- Implement weekday exclusion logic in elapsed days calculation
- Add tests to verify business days calculation

```yaml
- uses: actions/stale@v9
  with:
    days-before-stale: 5
    days-before-close: 2
    exclude-weekdays: '0,6'  # Exclude weekends
```
alpaca-tc added a commit to alpaca-tc/stale that referenced this issue Mar 7, 2025

Unverified

This user has not yet uploaded their public signing key.
Fixed actions#564

Add support for excluding specific weekdays when calculating elapsed days for stale issues and PRs. This is particularly useful for organizations that want to consider only business days.

- Add new `exclude-weekdays` option to specify which days to exclude (0-6, where 0 is Sunday)
- Implement weekday exclusion logic in elapsed days calculation
- Add tests to verify business days calculation

```yaml
- uses: actions/stale@v9
  with:
    days-before-stale: 5
    days-before-close: 2
    exclude-weekdays: '0,6'  # Exclude weekends
```
alpaca-tc added a commit to alpaca-tc/stale that referenced this issue Mar 7, 2025

Unverified

This user has not yet uploaded their public signing key.
Fixed actions#564

Add support for excluding specific weekdays when calculating elapsed days for stale issues and PRs. This is particularly useful for organizations that want to consider only business days.

- Add new `exclude-weekdays` option to specify which days to exclude (0-6, where 0 is Sunday)
- Implement weekday exclusion logic in elapsed days calculation
- Add tests to verify business days calculation

```yaml
- uses: actions/stale@v9
  with:
    days-before-stale: 5
    days-before-close: 2
    exclude-weekdays: '0,6'  # Exclude weekends
```
alpaca-tc added a commit to alpaca-tc/stale that referenced this issue Mar 7, 2025
Fixed actions#564

Add support for excluding specific weekdays when calculating elapsed days for stale issues and PRs. This is particularly useful for organizations that want to consider only business days.

- Add new `exclude-weekdays` option to specify which days to exclude (0-6, where 0 is Sunday)
- Implement weekday exclusion logic in elapsed days calculation
- Add tests to verify business days calculation

```yaml
- uses: actions/stale@v9
  with:
    days-before-stale: 5
    days-before-close: 2
    exclude-weekdays: '0,6'  # Exclude weekends
```
alpaca-tc added a commit to alpaca-tc/stale that referenced this issue Mar 7, 2025
Fixed actions#564

Add support for excluding specific weekdays when calculating elapsed days for stale issues and PRs. This is particularly useful for organizations that want to consider only business days.

- Add new `exclude-weekdays` option to specify which days to exclude (0-6, where 0 is Sunday)
- Implement weekday exclusion logic in elapsed days calculation
- Add tests to verify business days calculation

```yaml
- uses: actions/stale@v9
  with:
    days-before-stale: 5
    days-before-close: 2
    exclude-weekdays: '0,6'  # Exclude weekends
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants