Skip to content

Github Action for Closing Stale PRs#1299

Merged
fzdy1914 merged 7 commits into
reposense:masterfrom
Tejas2805:close-stale-issues
Aug 2, 2020
Merged

Github Action for Closing Stale PRs#1299
fzdy1914 merged 7 commits into
reposense:masterfrom
Tejas2805:close-stale-issues

Conversation

@Tejas2805

@Tejas2805 Tejas2805 commented Jul 9, 2020

Copy link
Copy Markdown
Contributor
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 fzdy1914 and jamessspanggg July 18, 2020 23:26

@jamessspanggg jamessspanggg left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@Tejas2805

Copy link
Copy Markdown
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.

@fzdy1914 fzdy1914 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@eugenepeh

Copy link
Copy Markdown
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
Copy Markdown
Contributor

@Tejas2805 have u tried it in your repo?

@Tejas2805

Copy link
Copy Markdown
Contributor Author

@Tejas2805 have u tried it in your repo?

Yup have. This is the link

@jamessspanggg

Copy link
Copy Markdown
Contributor

Yup have. This is the link

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

@Tejas2805

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@fzdy1914 If all okay, can merge this?

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

Copy link
Copy Markdown
Member

@Tejas2805 it seems to be failing

@fzdy1914

fzdy1914 commented Aug 2, 2020

Copy link
Copy Markdown
Member

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
Copy Markdown
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

Tejas2805 commented Dec 22, 2020

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
Member

@Tejas2805 So actions/stale@v3.0.7 this is a third party action?

@fzdy1914

Copy link
Copy Markdown
Member

@Tejas2805
image

Is this enough?

@Tejas2805

Copy link
Copy Markdown
Contributor Author

@Tejas2805 So actions/stale@v3.0.7 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
Copy Markdown
Contributor Author

@Tejas2805
Is this enough?

Should be okay.

@Tejas2805

Copy link
Copy Markdown
Contributor Author

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

@fzdy1914

Copy link
Copy Markdown
Member

Can we exempt for draft PRs like #1096?

@Tejas2805

Copy link
Copy Markdown
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