From 1f4906c2eb4ebe749ee0dd5beac05e931683dd11 Mon Sep 17 00:00:00 2001 From: James James Date: Wed, 27 May 2020 11:20:59 +0100 Subject: [PATCH 1/6] testing without skip ci prefix --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f456238..f2dc07a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # Simple GitHub Action +Testing WIP PR This action will not comment on all Pull requests made in this repository. From fffbdc4d376daf880e8fe3fc7968a8c4a073496d Mon Sep 17 00:00:00 2001 From: James James Date: Wed, 27 May 2020 11:23:22 +0100 Subject: [PATCH 2/6] [ci skip] should not close when repoened --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f2dc07a..52ca269 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # Simple GitHub Action -Testing WIP PR +Testing WIP This action will not comment on all Pull requests made in this repository. From 8a3b963302706b80c0d20d5d2f34fb23050f8d45 Mon Sep 17 00:00:00 2001 From: James James Date: Mon, 1 Jun 2020 12:37:55 +0100 Subject: [PATCH 3/6] synchronize? --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 52ca269..3338c26 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # Simple GitHub Action -Testing WIP +Testing This action will not comment on all Pull requests made in this repository. From 27907b4c22c31a19b2c683dd76be44029579751d Mon Sep 17 00:00:00 2001 From: James James Date: Tue, 4 Aug 2020 11:00:51 +0100 Subject: [PATCH 4/6] minor change --- .../oppiabot/src/issues/checkIssueLabels.js | 83 ++++++++++--------- 1 file changed, 46 insertions(+), 37 deletions(-) diff --git a/.github/actions/oppiabot/src/issues/checkIssueLabels.js b/.github/actions/oppiabot/src/issues/checkIssueLabels.js index b7bb459..d38c83d 100644 --- a/.github/actions/oppiabot/src/issues/checkIssueLabels.js +++ b/.github/actions/oppiabot/src/issues/checkIssueLabels.js @@ -9,13 +9,15 @@ const checkLabels = async () => { const token = core.getInput('repo-token'); const label = context.payload.label; const octokit = new GitHub(token); - const user = context.payload.sender.login + const user = context.payload.sender.login; - if (label.name === GOOD_FIRST_LABEL && - !whitelist.goodFirstIssue.includes(user)) { - core.info(`good first issue label got added by non whitelisted user`); + if ( + label.name === GOOD_FIRST_LABEL && + !whitelist.goodFirstIssue.includes(user) + ) { + core.info(`good first issue label got added by non whitelisted individual`); await handleGoodFirstIssue(octokit, user); - } else if(prLabels.includes(label.name) || label.name.startsWith('PR')) { + } else if (prLabels.includes(label.name) || label.name.startsWith('PR')) { core.info('PR label got added on an issue'); await handlePRLabel(octokit, label.name, user); } @@ -30,24 +32,26 @@ const checkLabels = async () => { const handleGoodFirstIssue = async (octokit, user) => { const issueNumber = context.payload.issue.number; // Comment on the issue and ping the onboarding team lead. - await octokit.issues.createComment( - { - body:'Hi @' + user + ', thanks for proposing this as a good first ' + - 'issue. Looping in @' + whitelist.teamLeads.onboardingTeam + - ' to confirm, removing the label until he does so.', - issue_number: issueNumber, - owner: context.repo.owner, - repo: context.repo.repo, - } - ); + await octokit.issues.createComment({ + body: + 'Hi @' + + user + + ', thanks for proposing this as a good first ' + + 'issue. Looping in @' + + whitelist.teamLeads.onboardingTeam + + ' to confirm, removing the label until he does so.', + issue_number: issueNumber, + owner: context.repo.owner, + repo: context.repo.repo, + }); // Remove the label. core.info(`Removing the label`); await octokit.issues.removeLabel({ - issue_number:issueNumber, + issue_number: issueNumber, name: GOOD_FIRST_LABEL, owner: context.repo.owner, - repo: context.repo.repo - }) + repo: context.repo.repo, + }); }; /** @@ -61,34 +65,39 @@ const handlePRLabel = async (octokit, label, user) => { const issueNumber = context.payload.issue.number; const linkText = 'here'; // add doc link. - const link = linkText.link() - let commentBody = '' - if(label.startsWith('PR CHANGELOG')) { + const link = linkText.link(); + let commentBody = ''; + if (label.startsWith('PR CHANGELOG')) { // Handle case for a changelog label. - commentBody = 'Hi @' + user + ', changelog labels should not be used on issues.' + - ' I’m removing the label. You can learn more about labels ' + link; + commentBody = + 'Hi @' + + user + + ', changelog labels should not be used on issues.' + + ' I’m removing the label. You can learn more about labels ' + + link; } else { - commentBody = 'Hi @' + user + ', the label label should only be used in pull requests.' + - ' I’m removing the label. You can learn more about labels ' + link; + commentBody = + 'Hi @' + + user + + ', the label label should only be used in pull requests.' + + ' I’m removing the label. You can learn more about labels ' + + link; } - await octokit.issues.createComment( - { - body:commentBody, - issue_number: issueNumber, - owner: context.repo.owner, - repo: context.repo.repo, - } - ); + await octokit.issues.createComment({ + body: commentBody, + issue_number: issueNumber, + owner: context.repo.owner, + repo: context.repo.repo, + }); // Remove the label. await octokit.issues.removeLabel({ - issue_number:issueNumber, + issue_number: issueNumber, name: label, owner: context.repo.owner, - repo: context.repo.repo - }) - + repo: context.repo.repo, + }); }; module.exports = { From b1bb19cb4cba635ede79d328d02e9d0f5645b22f Mon Sep 17 00:00:00 2001 From: James James Date: Tue, 4 Aug 2020 11:03:24 +0100 Subject: [PATCH 5/6] minor change --- .github/workflows/on-push.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index c2e640f..cf8c7ba 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -6,9 +6,11 @@ name: WIP TITLE # events but only for the master branch on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + types: + - synchronize + - edited # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -19,8 +21,8 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: ./.github/actions/no-wip - with: - repo-token: ${{secrets.GITHUB_TOKEN}} + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + - uses: ./.github/actions/no-wip + with: + repo-token: ${{secrets.GITHUB_TOKEN}} From d5ab3d8ef1d00929782a4e74888f1225c9459359 Mon Sep 17 00:00:00 2001 From: James James Date: Wed, 5 Aug 2020 13:32:09 +0100 Subject: [PATCH 6/6] modify readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3338c26..629f388 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,4 @@ Testing This action will not comment on all Pull requests made in this repository. +Modifying the Readme.