Skip to content

[#1166] Set up GitHub Actions#1168

Closed
Tejas2805 wants to merge 29 commits into
reposense:masterfrom
Tejas2805:github-actions
Closed

[#1166] Set up GitHub Actions#1168
Tejas2805 wants to merge 29 commits into
reposense:masterfrom
Tejas2805:github-actions

Conversation

@Tejas2805

@Tejas2805 Tejas2805 commented Mar 19, 2020

Copy link
Copy Markdown
Contributor

Fixes #1166

First-time contributors have a difficult time matching RepoSense's 
contribution guidelines and it becomes the onus of the senior 
developers to manually check and guide them.

Let's automate this process by using Github Actions to leave a comment 
and guide them on how to match our guidelines. 
Let's also automate other housekeeping tasks such as auto-closing
inactive PRs. 

@Tejas2805 Tejas2805 closed this Mar 20, 2020
@Tejas2805 Tejas2805 reopened this Mar 20, 2020
@Tejas2805 Tejas2805 changed the title Set up GitHub Actions [#1166] Set up GitHub Actions Mar 20, 2020
@Tejas2805 Tejas2805 marked this pull request as ready for review March 20, 2020 09:54
@Tejas2805

Copy link
Copy Markdown
Contributor Author

@damithc Need your review on this.

I have kept it at 30 days for now before declaring it stale and 7 more days before closing it.

@damithc damithc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Added some comments.

Comment thread .github/workflows/first-interaction.yml Outdated
Comment thread .github/workflows/first-interaction.yml Outdated
Comment thread .github/workflows/stale.yml Outdated
@Tejas2805 Tejas2805 closed this Mar 22, 2020
@Tejas2805 Tejas2805 reopened this Mar 22, 2020
@Tejas2805 Tejas2805 requested a review from a team March 22, 2020 11:54
@Tejas2805 Tejas2805 closed this Mar 23, 2020
@Tejas2805 Tejas2805 reopened this Mar 23, 2020
Comment thread .github/workflows/first-interaction.yml Outdated
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

pr-message: 'Thank you for submitting this PR. Please double-check to ensure that you have followed our contribution guidelines and update the commit message and title of your Pull Request accordingly. Once you are ready, and all the checks pass, do let us know!'

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.

is it possible to add the link to contribution guideline here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let me try

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Apparently they don't allow links as of now. We might have to proceed ahead with the link functionality for now.

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.

Did you try with Markdown? i.e. [text](url)

Comment thread .github/workflows/stale.yml Outdated
DAYS_BEFORE_CLOSE: 7
STALE_ISSUE_LABEL: 'stale'
STALE_PR_LABEL: 'stale'
STALE_PR_MESSAGE: 'Hi, were are going to mark this PR as stale because it has not had any updates for 30 days. If no further activity occurs within the following 7 days, it will be automatically closed so that others can take up the issue.If you are still working on this PR, please make a follow-up commit within 7 days and do leave a comment if you are still working on this PR. Please also let us know if you are stuck so we can help you!'

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.

we are going to
inactivity for 30 days?
If you are still working on this PR, please make a follow-up commit within next 7 days and leave a comment to remove the stale label.

@Tejas2805

Copy link
Copy Markdown
Contributor Author

@damithc There is an update on this. The action also closes issues. And there is only one way to stop it rn. By using the exempt-issue-label tag. So we can just put all our labels in this and no issue will close. Is it okay to proceed with this? Or should we remove the action for now?

@damithc

damithc commented Mar 23, 2020

Copy link
Copy Markdown
Collaborator

@damithc There is an update on this. The action also closes issues. And there is only one way to stop it rn. By using the exempt-issue-label tag. So we can just put all our labels in this and no issue will close. Is it okay to proceed with this? Or should we remove the action for now?

will that prevent PRs from closing too (if the same label is applied)?

@Tejas2805

Tejas2805 commented Mar 23, 2020

Copy link
Copy Markdown
Contributor Author

will that prevent PRs from closing too (if the same label is applied)?

No, it won't. Only the issues.

UPDATE: Found another way to handle this. Shouldn't be a problem anymore

@Tejas2805 Tejas2805 requested review from a team and 0blivious March 23, 2020 23:33
@Tejas2805 Tejas2805 requested a review from yong24s March 25, 2020 09:49
@yong24s

yong24s commented Mar 25, 2020

Copy link
Copy Markdown
Contributor

The first-action has a flaw. It's only for people who are members of the organization and shows up for them only.

If it's not a limitation of GitHub's API, then we can fork and upgrade the project.

Comment thread .github/workflows/stale.yml Outdated
- name: stale
uses: gatsbyjs/stale@v1.1.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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.

Will this work for forked PRs as well?

@Tejas2805 Tejas2805 Mar 25, 2020

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should work I believe. I have tried it on one of my repos from another account.

@jamessspanggg jamessspanggg Mar 28, 2020

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.

Do u mean this repo? It seems like the labelling is working, but the closing is not tho.

One of the PRs was created 5 days ago, but according to ur yml file, the closing is one day after the PR is marked as stale.

@Tejas2805

Copy link
Copy Markdown
Contributor Author

If it's not a limitation of GitHub's API, then we can fork and upgrade the project.

Don't think it a GitHub API limitation, since other actions provide the same feature.

I will look into it in another PR? Cause will take a bit of time to figure that out.

on:
schedule:
# Runs at 00:00 every day
- cron: '0 0 * * *'

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.

A clarification: does this check run every day?

@Tejas2805

Copy link
Copy Markdown
Contributor Author

This PR will take a bit of time. Creating own action based on our needs after forking.

@Tejas2805

Copy link
Copy Markdown
Contributor Author

Update: Have gotten it to work for labelling and closing PRs. If any suggestions on how to remove the label after a update, do let me know.

@jamessspanggg

Copy link
Copy Markdown
Contributor

Update: Have gotten it to work for labelling and closing PRs. If any suggestions on how to remove the label after a update, do let me know.

Perhaps can look at this? https://developer.github.com/v3/issues/#update-an-issue

@Tejas2805

Copy link
Copy Markdown
Contributor Author

Perhaps can look at this? https://developer.github.com/v3/issues/#update-an-issue

Thanks! Looking into it.

@Tejas2805

Copy link
Copy Markdown
Contributor Author

The update for removing the label is on its way. Shall we wait or proceed for once? For the first 1/2 months, we might have to remove the labels manually but then shall get automated.

@fzdy1914

Copy link
Copy Markdown
Member

Hi, Can I know the status of this PR? the change part seems to be weird?

@Tejas2805

Copy link
Copy Markdown
Contributor Author

Continued in PR #1299

@Tejas2805 Tejas2805 closed this Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup Github Actions for first time contributors

7 participants