Skip to content
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

No way to reset cache to 'reset' Scala Steward #326

Open
milanvdm opened this issue Feb 8, 2022 · 5 comments
Open

No way to reset cache to 'reset' Scala Steward #326

milanvdm opened this issue Feb 8, 2022 · 5 comments

Comments

@milanvdm
Copy link

milanvdm commented Feb 8, 2022

Due to #316, its now not possible to clear the cache of the action.

Currently, I would like to reset Scala Steward to reopen manually closed PRs.

Im not sure what the middle ground is between #316 and this missing feature.

@alejandrohdezma
Copy link
Member

Will it help to add a "special" case that under some condition (like the presence of an environment variable) completely disables the cache?

@milanvdm
Copy link
Author

milanvdm commented Feb 9, 2022

@alejandrohdezma Yea, it is indeed an edge case in case you want to rerun scala-steward from scratch ignoring manually closed PRs from the past.

So an environment variable makes total sense to me.

Extra context:

  1. I ran scala-steward with a personal Github token
  2. It opened a lot of PRs under my name causing a flood of email notifications
  3. I manually closed those PRs
  4. Switched to a Github App token
  5. Want to reopen all PRs under the new App token

So step 5 is currently not possible as it keeps ignoring the previously opened PRs under my own name.

@fthomas
Copy link
Member

fthomas commented Feb 9, 2022

Removing the cache does not imply that Scala Steward creates new PRs for updates whose PRs were previously closed. It queries the GitHub API for already existing PRs with the same branch name and won't open a new PR if it finds any:
https://github.com/scala-steward-org/scala-steward/blob/19909281fa163dd689ed2597dafd26302c279269/modules/core/src/main/scala/org/scalasteward/core/nurture/NurtureAlg.scala#L90-L94

@milanvdm
Copy link
Author

milanvdm commented Feb 9, 2022

Mmm, so that would mean a change in scala-steward itself to make this possible since there is no flag atm to control this behavior?
Does this make sense to be added?

@alejandrohdezma
Copy link
Member

@fthomas does it make sense to have this added in scala-steward? It could be a new flag like --ignore-old-prs.

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

No branches or pull requests

3 participants