-
Notifications
You must be signed in to change notification settings - Fork 120
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
Add Github workflows For Task automation #403
Conversation
WalkthroughThis pull request introduces multiple GitHub Actions workflows to automate commenting and labeling on issues and pull requests. The new workflows include automatic comments for newly opened issues, pull requests, and merged pull requests, as well as automated labeling for issues and pull requests. Additionally, there are workflows for closing linked issues upon pull request merges and commenting on closed issues. Each workflow is designed to enhance user engagement and streamline issue management within the repository. Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
❌ Deploy Preview for manageyourwaste failed. Why did it fail? →
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 23
🧹 Outside diff range and nitpick comments (3)
.github/workflows/comment_iss-close.yml (1)
29-29
: Add newline at end of file.Add a newline character at the end of the file to follow YAML best practices.
Add a blank line after line 29.
🧰 Tools
🪛 yamllint
[error] 29-29: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/auto_label_pr.yml (1)
1-37
: Add missing PR labeling functionalityWhile this workflow handles PR commenting, it doesn't implement the PR labeling functionality mentioned in the PR objectives. Consider either:
- Adding labeling logic to this workflow, or
- Creating a separate workflow for PR labeling
Would you like me to help implement the PR labeling functionality? I can provide a sample implementation that:
- Adds labels based on PR title/description keywords
- Labels PRs based on changed files
- Applies size labels based on the number of changes
🧰 Tools
🪛 yamllint
[error] 37-37: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/auto_comment_pr_merge.yml (1)
11-17
: Remove redundant permissions configuration.The job-level permissions for pull-requests are redundant since they're already defined at the workflow level.
jobs: comment: runs-on: ubuntu-latest - permissions: - pull-requests: write if: github.event.pull_request.merged == true
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (7)
- .github/workflows/auto_comment_on_issue.yml (1 hunks)
- .github/workflows/auto_comment_pr_merge.yml (1 hunks)
- .github/workflows/auto_comment_pr_raise.yml (1 hunks)
- .github/workflows/auto_label_pr.yml (1 hunks)
- .github/workflows/auto_lable_issue.yml (1 hunks)
- .github/workflows/close_issue_on_pr_merge.yml (1 hunks)
- .github/workflows/comment_iss-close.yml (1 hunks)
🧰 Additional context used
🪛 yamllint
.github/workflows/auto_comment_on_issue.yml
[error] 36-36: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/auto_comment_pr_merge.yml
[error] 36-36: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/auto_comment_pr_raise.yml
[error] 37-37: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/auto_label_pr.yml
[error] 37-37: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/auto_lable_issue.yml
[error] 21-21: trailing spaces
(trailing-spaces)
[error] 36-36: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/close_issue_on_pr_merge.yml
[error] 30-30: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/comment_iss-close.yml
[error] 29-29: no new line character at the end of file
(new-line-at-end-of-file)
🪛 actionlint
.github/workflows/auto_comment_pr_merge.yml
20-20: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
.github/workflows/close_issue_on_pr_merge.yml
13-13: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
17-17: shellcheck reported issue in this script: SC2086:info:7:69: Double quote to prevent globbing and word splitting
(shellcheck)
17-17: shellcheck reported issue in this script: SC2086:info:11:69: Double quote to prevent globbing and word splitting
(shellcheck)
.github/workflows/comment_iss-close.yml
14-14: the runner of "actions/github-script@v5" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (8)
.github/workflows/comment_iss-close.yml (1)
1-11
: LGTM! Well-configured workflow trigger and permissions.The workflow follows security best practices by:
- Using specific event triggers
- Explicitly declaring minimal required permissions
.github/workflows/auto_comment_on_issue.yml (1)
10-15
: LGTM!The job configuration is well-structured and uses appropriate settings.
.github/workflows/auto_comment_pr_raise.yml (1)
25-35
: 🛠️ Refactor suggestionConsider using GitHub CLI for simpler implementation.
The current implementation using
curl
is functional but could be simplified using the GitHub CLI (gh
). Additionally, the error handling could be improved to handle rate limiting and provide more detailed error messages.Here's a suggested improvement using GitHub CLI:
- RESPONSE=$(curl -s -o response.json -w "%{http_code}" \ - -X POST \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \ - -d "$COMMENT") - cat response.json - if [ "$RESPONSE" -ne 201 ]; then - echo "Failed to add comment" - exit 1 - fi + if ! gh pr comment ${{ github.event.pull_request.number }} --body "$(echo "$COMMENT" | jq -r .body)"; then + echo "::error::Failed to add comment to PR" + exit 1 + fiThis change:
- Uses
gh pr comment
for simpler API interaction- Removes the need for manual JSON handling
- Uses GitHub Actions error logging
Let's verify if GitHub CLI is available in the workflow environment:
.github/workflows/auto_label_pr.yml (1)
4-5
: Review security implications of pull_request_targetThe
pull_request_target
trigger runs workflows with repository token permissions in the context of the base repository. While this is necessary for commenting on PRs from forks, ensure that no untrusted code from the PR is checked out or executed in this workflow.✅ Verification successful
No security concerns with current pull_request_target usage
The workflows using
pull_request_target
are secure because:
- None of them use
actions/checkout
to access PR code- They only perform safe operations:
auto_label_pr.yml
andauto_comment_pr_raise.yml
just post welcome comments using GitHub APIgreetings.yaml
uses the officialactions/first-interaction
action to post welcome messages- All workflows have properly restricted permissions using the
permissions
block- They only trigger on
opened
event type (except greetings which is safe by design)🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check if any other workflows in the repository use pull_request_target and potentially checkout code rg -l "pull_request_target" .github/workflows/ | while read -r file; do echo "Checking $file for potential security issues..." rg "actions/checkout" "$file" -C 5 doneLength of output: 805
Script:
#!/bin/bash # Let's examine the content of these workflows to understand their usage of pull_request_target echo "=== Content of auto_label_pr.yml ===" cat .github/workflows/auto_label_pr.yml echo -e "\n=== Content of auto_comment_pr_raise.yml ===" cat .github/workflows/auto_comment_pr_raise.yml echo -e "\n=== Content of greetings.yaml ===" cat .github/workflows/greetings.yamlLength of output: 3166
.github/workflows/close_issue_on_pr_merge.yml (1)
3-6
: 🛠️ Refactor suggestionOptimize workflow trigger configuration
The workflow currently runs on all PR closures but only executes when PRs are merged. Consider optimizing the trigger to only run on merged PRs:
on: pull_request: - types: [closed] + types: [closed, merged]Likely invalid or redundant comment.
.github/workflows/auto_comment_pr_merge.yml (1)
1-10
: LGTM! Well-configured workflow trigger and permissions.The workflow is properly configured to trigger on PR closures with appropriate scoped permissions for issues and pull requests.
.github/workflows/auto_lable_issue.yml (2)
3-6
: LGTM: Workflow triggers are appropriate.The workflow triggers on issue events (opened, reopened, edited) are well-defined and appropriate for the labeling use case.
10-11
: LGTM: Minimal permissions following principle of least privilege.The workflow correctly specifies minimal
issues: write
permissions needed for labeling operations.
issues: write | ||
steps: | ||
- name: Greet User | ||
uses: actions/github-script@v5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update github-script action version for security.
The current version (v5) is outdated. Update to the latest version for security improvements and bug fixes.
Apply this diff:
- uses: actions/github-script@v5
+ uses: actions/github-script@v7
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
uses: actions/github-script@v5 | |
uses: actions/github-script@v7 |
🧰 Tools
🪛 actionlint
14-14: the runner of "actions/github-script@v5" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
github.rest.issues.createComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: issueNumber, | ||
body: greetingMessage | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add error handling and enhance the comment message.
The current implementation could be more robust with:
- Error handling for the API call
- A more informative closing message
Consider this improved implementation:
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
- body: greetingMessage
- });
+ body: `Hello @${issueCreator}! 👋
+
+Issue #${issueNumber} has been closed. Thank you for your contribution! 🙏
+
+If you believe this was closed by mistake, please feel free to comment or reopen.`
+ }).catch(error => {
+ core.setFailed(`Failed to create comment: ${error.message}`);
+ });
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
github.rest.issues.createComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: issueNumber, | |
body: greetingMessage | |
}); | |
github.rest.issues.createComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: issueNumber, | |
body: `Hello @${issueCreator}! 👋 | |
Issue #${issueNumber} has been closed. Thank you for your contribution! 🙏 | |
If you believe this was closed by mistake, please feel free to comment or reopen.` | |
}).catch(error => { | |
core.setFailed(`Failed to create comment: ${error.message}`); | |
}); |
🧰 Tools
🪛 yamllint
[error] 29-29: no new line character at the end of file
(new-line-at-end-of-file)
permissions: | ||
issues: write | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Remove duplicate permissions declaration.
The permissions are defined both at the workflow level and job level. The workflow-level permissions are sufficient, and the job-level permissions can be removed to avoid redundancy.
permissions:
issues: write
jobs:
comment:
runs-on: ubuntu-latest
- permissions:
- issues: write
steps:
Also applies to: 13-14
exit 1 | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add newline at end of file.
Add a newline character at the end of the file to comply with YAML best practices and fix the yamllint error.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
Committable suggestion was skipped due to low confidence.
🧰 Tools
🪛 yamllint
[error] 36-36: no new line character at the end of file
(new-line-at-end-of-file)
- name: Add Comment to Issue | ||
run: | | ||
COMMENT=$(cat <<EOF | ||
{ | ||
"body": "Thank you for creating this issue! 🎉 We'll look into it as soon as possible." | ||
} | ||
EOF | ||
) | ||
RESPONSE=$(curl -s -o response.json -w "%{http_code}" \ | ||
-X POST \ | ||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \ | ||
-d "$COMMENT") | ||
cat response.json | ||
if [ "$RESPONSE" -ne 201 ]; then | ||
echo "Failed to add comment" | ||
exit 1 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Enhance error handling and comment formatting.
While the basic functionality is implemented correctly, there are several areas for improvement:
- The JSON body needs proper escaping for special characters
- Error handling could be more robust
- The welcome message could be more informative by including links to contribution guidelines
Here's an improved implementation:
- name: Add Comment to Issue
run: |
COMMENT=$(cat <<EOF
{
- "body": "Thank you for creating this issue! 🎉 We'll look into it as soon as possible."
+ "body": "Thank you for creating this issue! 🎉\n\nWe'll look into it as soon as possible. In the meantime, please make sure you have:\n\n- [ ] Provided a clear description\n- [ ] Added relevant labels\n- [ ] Checked for similar existing issues\n\nFor more information, check out our [contribution guidelines](../../CONTRIBUTING.md)."
}
EOF
)
+ # Ensure curl succeeds
+ set -e
+
RESPONSE=$(curl -s -o response.json -w "%{http_code}" \
-X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \
- -d "$COMMENT")
+ -d "$(echo "$COMMENT" | jq -c '.')")
+
+ # Check for curl errors
+ if [ $? -ne 0 ]; then
+ echo "Failed to make API request"
+ exit 1
+ fi
+
cat response.json
if [ "$RESPONSE" -ne 201 ]; then
- echo "Failed to add comment"
+ echo "Failed to add comment. Server responded with code $RESPONSE"
+ echo "Error details:"
+ jq '.message' response.json
exit 1
fi
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- name: Add Comment to Issue | |
run: | | |
COMMENT=$(cat <<EOF | |
{ | |
"body": "Thank you for creating this issue! 🎉 We'll look into it as soon as possible." | |
} | |
EOF | |
) | |
RESPONSE=$(curl -s -o response.json -w "%{http_code}" \ | |
-X POST \ | |
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \ | |
-d "$COMMENT") | |
cat response.json | |
if [ "$RESPONSE" -ne 201 ]; then | |
echo "Failed to add comment" | |
exit 1 | |
fi | |
- name: Add Comment to Issue | |
run: | | |
COMMENT=$(cat <<EOF | |
{ | |
"body": "Thank you for creating this issue! 🎉\n\nWe'll look into it as soon as possible. In the meantime, please make sure you have:\n\n- [ ] Provided a clear description\n- [ ] Added relevant labels\n- [ ] Checked for similar existing issues\n\nFor more information, check out our [contribution guidelines](../../CONTRIBUTING.md)." | |
} | |
EOF | |
) | |
# Ensure curl succeeds | |
set -e | |
RESPONSE=$(curl -s -o response.json -w "%{http_code}" \ | |
-X POST \ | |
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \ | |
-d "$(echo "$COMMENT" | jq -c '.')") | |
# Check for curl errors | |
if [ $? -ne 0 ]; then | |
echo "Failed to make API request" | |
exit 1 | |
fi | |
cat response.json | |
if [ "$RESPONSE" -ne 201 ]; then | |
echo "Failed to add comment. Server responded with code $RESPONSE" | |
echo "Error details:" | |
jq '.message' response.json | |
exit 1 | |
fi |
@@ -0,0 +1,36 @@ | |||
name: Auto Label Issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo in workflow filename.
The workflow filename contains a typo: auto_lable_issue.yml
should be auto_label_issue.yml
.
Rename the file to fix the typo:
git mv .github/workflows/auto_lable_issue.yml .github/workflows/auto_label_issue.yml
name: Auto Label Issue | ||
|
||
on: | ||
issues: | ||
types: [opened, reopened, edited] | ||
|
||
jobs: | ||
label_issue: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Label Issue | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
const issue = context.payload.issue; | ||
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-ext','hacktoberfest-accepted','hacktoberfest'] | ||
}); | ||
const addLabel = async (label) => { | ||
await github.rest.issues.addLabels({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: issue.number, | ||
labels: [label] | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix YAML formatting issues.
There are two formatting issues in the file:
- Trailing spaces on line 21
- Missing newline at end of file
Apply these fixes:
- Remove trailing spaces
- Add a newline at the end of the file
🧰 Tools
🪛 yamllint
[error] 21-21: trailing spaces
(trailing-spaces)
[error] 36-36: no new line character at the end of file
(new-line-at-end-of-file)
const addLabel = async (label) => { | ||
await github.rest.issues.addLabels({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: issue.number, | ||
labels: [label] | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused helper function.
The addLabel
helper function is defined but never used in the workflow.
Either remove the unused function or implement its intended usage:
- const addLabel = async (label) => {
- await github.rest.issues.addLabels({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: issue.number,
- labels: [label]
- });
- };
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
const addLabel = async (label) => { | |
await github.rest.issues.addLabels({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: issue.number, | |
labels: [label] | |
}); | |
}; |
🧰 Tools
🪛 yamllint
[error] 36-36: no new line character at the end of file
(new-line-at-end-of-file)
await github.rest.issues.addLabels({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: issue.number, | ||
labels: ['gssoc-ext','hacktoberfest-accepted','hacktoberfest'] | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revise hardcoded Hacktoberfest labels.
The workflow automatically adds Hacktoberfest-related labels to all issues regardless of timing. This could be misleading as Hacktoberfest is a time-bound event (October).
Consider adding a condition to check if it's October before adding Hacktoberfest labels:
- await github.rest.issues.addLabels({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: issue.number,
- labels: ['gssoc-ext','hacktoberfest-accepted','hacktoberfest']
- });
+ const today = new Date();
+ const labels = ['gssoc-ext'];
+
+ // Only add Hacktoberfest labels during October
+ if (today.getMonth() === 9) { // JavaScript months are 0-based
+ labels.push('hacktoberfest-accepted', 'hacktoberfest');
+ }
+
+ await github.rest.issues.addLabels({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: issue.number,
+ labels: labels
+ });
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
await github.rest.issues.addLabels({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: issue.number, | |
labels: ['gssoc-ext','hacktoberfest-accepted','hacktoberfest'] | |
}); | |
const today = new Date(); | |
const labels = ['gssoc-ext']; | |
// Only add Hacktoberfest labels during October | |
if (today.getMonth() === 9) { // JavaScript months are 0-based | |
labels.push('hacktoberfest-accepted', 'hacktoberfest'); | |
} | |
await github.rest.issues.addLabels({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: issue.number, | |
labels: labels | |
}); |
script: | | ||
const issue = context.payload.issue; | ||
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-ext','hacktoberfest-accepted','hacktoberfest'] | ||
}); | ||
const addLabel = async (label) => { | ||
await github.rest.issues.addLabels({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: issue.number, | ||
labels: [label] | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add error handling for GitHub API operations.
The script lacks error handling for the label operations, which could fail silently if there are API issues.
Add try-catch blocks to handle potential errors:
script: |
+ try {
const issue = context.payload.issue;
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-ext','hacktoberfest-accepted','hacktoberfest']
});
+ } catch (error) {
+ console.error('Failed to add labels:', error);
+ core.setFailed(error.message);
+ }
Committable suggestion was skipped due to low confidence.
🧰 Tools
🪛 yamllint
[error] 21-21: trailing spaces
(trailing-spaces)
[error] 36-36: no new line character at the end of file
(new-line-at-end-of-file)
fix: #396
Auto Comment on Issue
Auto Comment on PR
Auto Comment on PR Merge
Auto Label Issues
Auto Label PRs
Close Issues on PR Merge
Comment on Issue Close
Summary by CodeRabbit
Release Notes
These enhancements aim to improve user interaction and streamline repository management processes.