Skip to content
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

chore: implemented GitHub workflow. #3

Merged
merged 5 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNER
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# These are the default owners for the whole repo. They will be requested for review wehen someone opens a pull request.
* @/iamdestinychild
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "DSA Issue Request (Bug)"
description: Create a new ticket for a new DSA bug or correction request
title: "[BUG] - <title>"
labels: [
"DSA",
"Bug",
"good first issue",
"priority:high",

]
body:
- type: textarea
id: Description
attributes:
label: "Description"
description: Provide a detailed description of the bug or correction. Include any relevant information, such as steps to reproduce the bug, expected behavior, and actual behavior.
validations:
required: true
- type: textarea
id: DSA_Problem
attributes:
label: "DSA Problem"
description: Indicate here the DSA problem that the issue is related to.
validations:
required: true
- type: textarea
id: Code
attributes:
label: "Code"
description: Provide a code snippet of the code that is affected by the bug or correction.
validations:
required: false
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "DSA Issue Request"
description: Create a new ticket for a new DSA issue request
title: "[ISSUE] - <title>"
labels: [
"DSA",
"Issue",
"hacktoberfest",
"priority:medium"
]
body:
- type: textarea
id: Description
attributes:
label: "Description"
description: Provide a detailed description of the issue. Include any relevant information, such as steps to reproduce the issue, expected behavior, and actual behavior.
validations:
required: true
- type: textarea
id: DSA_Problem
attributes:
label: "DSA Problem"
description: Indicate here the DSA problem that the issue is related to.
validations:
required: true
52 changes: 52 additions & 0 deletions .github/workflows/issue-management.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: DSA Issue Management

on:
issues:
types: [opened, edited, closed]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Label issues
uses: actions/labeler@v4
with:
configuration_path: .github/labels.yml

- name: Assign issues
uses: actions/github-script@v5
with:
script: |
github.issues.update({
issue_number: context.issue.number,
assignees: ['assignee1', 'assignee2']
})

- name: Notify assignees
uses: actions/github-script@v5
with:
script: |
github.issues.createComment({
issue_number: context.issue.number,
body: '@assignee1, @assignee2, you have been assigned this issue.'
})

- name: Close duplicate issues
uses: actions/github-script@v5
with:
script: |
const duplicates = await github.issues.listForRepo({
repository: context.repo.name,
issue_number: context.issue.number,
duplicates: true
})

duplicates.forEach(async (duplicate) => {
await github.issues.update({
issue_number: duplicate.issue_number,
state: 'closed'
})
})
28 changes: 28 additions & 0 deletions .github/workflows/superlinter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint Code Base

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: Lint Code Base
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
statuses: write

steps:
- uses: super-linter/[email protected]
name: Super-Linter
with:
fetch-depth: 0
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}