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

build: automatically close stale issues that have not responded an info for request #5297

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

sofisl
Copy link
Contributor

@sofisl sofisl commented Apr 30, 2024

Going to experiment with some code provided here

The new workflow will require maintainers to add a needs more info label if more information is requested.

@sofisl sofisl requested review from yoshi-approver and a team as code owners April 30, 2024 17:04
Comment on lines 40 to 52
github.rest.issues.update({
owner: owner,
repo: repo,
issue_number: number,
state: "closed",
});

github.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: number,
body: close_message,
});
Copy link
Member

Choose a reason for hiding this comment

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

Are these asynchronous? If so, do we need awaits?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

woops good catch, thank you!

const labels = issue.data.labels.map((e) => e.name);

if (author === commenter && labels.includes("needs more info")) {
github.rest.issues.removeLabel({
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
github.rest.issues.removeLabel({
await github.rest.issues.removeLabel({

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.

None yet

2 participants