From 8d6969adffc53533868da786f0390dca0d473059 Mon Sep 17 00:00:00 2001 From: Anjaliavv51 <154777864+Anjaliavv51@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:49:51 +0530 Subject: [PATCH 1/2] final code which adds gssoc label for all issues and pr #19 --- .github/workflows/add-gssoc-label-pr.yml | 8 ++++++++ .github/workflows/auto-label-issues.yml | 12 ++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/add-gssoc-label-pr.yml b/.github/workflows/add-gssoc-label-pr.yml index de174e0..205efa3 100644 --- a/.github/workflows/add-gssoc-label-pr.yml +++ b/.github/workflows/add-gssoc-label-pr.yml @@ -19,6 +19,14 @@ jobs: const prBody = pr.body ? pr.body.toLowerCase() : ''; const prTitle = pr.title.toLowerCase(); + // Add gssoc label to all PRs + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: pr.number, + labels: ['gssoc'] + }); + const addLabel = async (label) => { await github.rest.issues.addLabels({ owner: context.repo.owner, diff --git a/.github/workflows/auto-label-issues.yml b/.github/workflows/auto-label-issues.yml index 8abb5ea..35a3db1 100644 --- a/.github/workflows/auto-label-issues.yml +++ b/.github/workflows/auto-label-issues.yml @@ -19,6 +19,14 @@ jobs: const issueBody = issue.body ? issue.body.toLowerCase() : ''; const issueTitle = issue.title.toLowerCase(); + // Add gssoc label to all issues + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + labels: ['gssoc'] + }); + const addLabel = async (label) => { await github.rest.issues.addLabels({ owner: context.repo.owner, @@ -35,8 +43,4 @@ jobs: } if (issueBody.includes('bug') || issueBody.includes('fix') || issueTitle.includes('fix') || issueTitle.includes('resolve')) { await addLabel('bug'); - } - - if (prBody.includes('gssoc')) { - await addLabel('gssoc'); } \ No newline at end of file From 84ace9c232c94363bc6daa5c147972f59898622f Mon Sep 17 00:00:00 2001 From: Anjaliavv51 <154777864+Anjaliavv51@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:57:48 +0530 Subject: [PATCH 2/2] changes pr template #19 --- .github/PULL_REQUEST_TEMPLATE.md | 13 +++++-------- .github/workflows/add-gssoc-label-pr.yml | 8 -------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index da6f7f2..44f52dd 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,21 +1,18 @@ ## Description -[Please include a brief description of the changes or features added] + ## Related Issues -[Cite any related issue(s) this pull request addresses. If none, simply state “None”] + - Closes # ## Type of PR + -- [ ] Bug fix -- [ ] Feature enhancement -- [ ] Documentation update -- [ ] Other (specify): _______________ ## Screenshots / videos (if applicable) -[Attach any relevant screenshots or videos demonstrating the changes] + ## Checklist @@ -29,4 +26,4 @@ ## Additional context: -[Include any additional information or context that might be helpful for reviewers.] + diff --git a/.github/workflows/add-gssoc-label-pr.yml b/.github/workflows/add-gssoc-label-pr.yml index 5b20d95..a470dea 100644 --- a/.github/workflows/add-gssoc-label-pr.yml +++ b/.github/workflows/add-gssoc-label-pr.yml @@ -19,14 +19,6 @@ jobs: const prBody = pr.body ? pr.body.toLowerCase() : ''; const prTitle = pr.title.toLowerCase(); - // Add gssoc label to all PRs - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr.number, - labels: ['gssoc'] - }); - const addLabel = async (label) => { await github.rest.issues.addLabels({ owner: context.repo.owner,