Skip to content

[Snyk] Upgrade commitlint from 19.3.0 to 19.4.0 #23

[Snyk] Upgrade commitlint from 19.3.0 to 19.4.0

[Snyk] Upgrade commitlint from 19.3.0 to 19.4.0 #23

Workflow file for this run

name: Auto-assign issue on /attempt comment
on:
issue_comment:
types: [created]
jobs:
auto-assign:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
github-token: ${{ secrets.REPO_GITHUB_TOKEN }}
script: |
const comment = context.payload.comment;
const issue = context.issue;
const owner = "abbhiishek";
const repo = "campus-connect"
if (comment.body.startsWith('/attempt')) {
if (!issue.assignee) {
await github.rest.issues.addAssignees({
owner,
repo,
issue_number: issue.number,
assignees: [comment.user.login]
});
await github.rest.issues.createComment({
owner,
repo,
issue_number: issue.number,
body: 'Assigned the issue to you!'
});
} else {
await github.rest.issues.createComment({
owner,
repo,
issue_number: issue.number,
body: 'This issue is already assigned. Tag a maintainer if you need to take over.'
});
}
}