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

Github Action for Closing Stale PRs #1299

Merged
merged 7 commits into from
Aug 2, 2020

Conversation

Tejas2805
Copy link
Contributor

@Tejas2805 Tejas2805 commented Jul 9, 2020

Few PRs are left open for a long time without any follow-up activity 
from the author of the PRs. This prevents other developers from 
taking up the issue and solving it. Therefore, the senior developers 
need to find such PRs manually and close them.

Let's automate the process of closing inactive PRs using GitHub Actions.

@Tejas2805 Tejas2805 requested review from fzdy1914 and jamessspanggg and removed request for jamessspanggg and fzdy1914 July 18, 2020 23:26
Copy link
Contributor

@jamessspanggg jamessspanggg left a comment

Choose a reason for hiding this comment

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

LGTM, we would have to create a GITHUB_TOKEN secret so that u can use this workflow right

@jamessspanggg
Copy link
Contributor

@eugenepeh might need you to add the access token as a secret

@Tejas2805
Copy link
Contributor Author

LGTM, we would have to create a GITHUB_TOKEN secret so that u can use this workflow right

I think that it will be required.

Copy link
Member

@fzdy1914 fzdy1914 left a comment

Choose a reason for hiding this comment

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

LGTM

@eugenepeh
Copy link
Member

From the GitHub Action Docs

GitHub automatically creates a GITHUB_TOKEN secret to use in your workflow. 
You can use the GITHUB_TOKEN to authenticate in a workflow run.

Hmm, doesn't seems like its needed to create this token.
Could you test it out in another repository?

@jamessspanggg
Copy link
Contributor

@Tejas2805 have u tried it in your repo?

@Tejas2805
Copy link
Contributor Author

@Tejas2805 have u tried it in your repo?

Yup have. This is the link

@jamessspanggg
Copy link
Contributor

Yup have. This is the link

Ok, you did not need to setup the GITHUB_TOKEN right?

@Tejas2805
Copy link
Contributor Author

Ok, you did not need to setup the GITHUB_TOKEN right?

Oh, thought you were asking if it works. Yup, don't need to set GITHUB_TOKEN for actions related to PR, Issues, and more. Just checked documentation too.

@Tejas2805
Copy link
Contributor Author

@fzdy1914 If all okay, can merge this?

@fzdy1914 fzdy1914 merged commit 143d76a into reposense:master Aug 2, 2020
@eugenepeh
Copy link
Member

@Tejas2805 it seems to be failing

@fzdy1914
Copy link
Member

fzdy1914 commented Aug 2, 2020

Yep, seems to be failing.

fzdy1914 added a commit that referenced this pull request Aug 2, 2020
fzdy1914 added a commit that referenced this pull request Aug 2, 2020
@jamessspanggg
Copy link
Contributor

The PR has been reverted to prevent the failures and spam emails. The failure has the following log, @Tejas2805 can you investigate on it:

Screen Shot 2020-08-02 at 2 35 01 PM

@Tejas2805
Copy link
Contributor Author

Tejas2805 commented Dec 22, 2020

@jamessspanggg @fzdy1914 I don't have access but can you guys check if this is enabled?

image

If this is enabled, then need to switch to - Enable local and third-party Actions for this repository.

@fzdy1914
Copy link
Member

@Tejas2805 So actions/[email protected] this is a third party action?

@fzdy1914
Copy link
Member

@Tejas2805
image

Is this enough?

@Tejas2805
Copy link
Contributor Author

@Tejas2805 So actions/[email protected] this is a third party action?

Actually when they say local they mean - actions for which the code is written within the repository or organization itself.

@Tejas2805
Copy link
Contributor Author

@Tejas2805
Is this enough?

Should be okay.

@Tejas2805
Copy link
Contributor Author

Do we want the Actions to work on all PRs (current implementation) or PRs to the master branch only?

@fzdy1914
Copy link
Member

Can we exempt for draft PRs like #1096?

@Tejas2805
Copy link
Contributor Author

Can we exempt for draft PRs like #1096?

We can exempt them by adding a label to the PR. And exempt PRs with those labels from being closed. Does the label - s.DoNotMerge - work?

@Tejas2805 Tejas2805 deleted the close-stale-issues branch January 5, 2021 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants