Skip to content

Commit

Permalink
ci: add ci checks
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepakBomjan committed Jun 24, 2024
1 parent 4fd6552 commit 9b403ac
Show file tree
Hide file tree
Showing 8 changed files with 185 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: iBriz
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/task-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Task template
about: Capture details for the tasks
title: ''
labels: iBriz
assignees: ''

---

### What needs to be done

Describe what needs to be done here.
Ex: "Relay synchronization starts from the most recently stored block header"

### Why it needs to be done

Describe why it needs to be done here.
Ex: "Reduces the amount of time for the relay to synchronize to the latest block"

### Acceptance Criteria

Describe how we can know whether the task is done.
Ex: When restarting the relay, synchronization picks up from the most recently stored block

### Additional Information

Describe anything relevant that hasn't been mentioned yet.
27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Description:

### Commit Message

```bash
type: commit message
```

see the [guidelines](https://github.com/icon-project/community/blob/main/guidelines/technical/software-development-guidelines.md#commit-messages) for commit messages.

### Changelog Entry

```bash
version: <log entry>
```

## Checklist:

- [ ] I have performed a self-review of my own code
- [ ] I have documented my code in accordance with the [documentation guidelines](https://github.com/icon-project/community/blob/main/guidelines/technical/software-development-guidelines.md#documentation)
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have run the unit tests
- [ ] I only have one commit (if not, squash them into one commit).
- [ ] I have a descriptive commit message that adheres to the [commit message guidelines](https://github.com/icon-project/community/blob/main/guidelines/technical/software-development-guidelines.md#commit-messages)

> Please review the [CONTRIBUTING.md](/CONTRIBUTING.md) file for detailed contributing guidelines.
15 changes: 15 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cicd:
- '.github/workflows/*'

scripts:
- 'scripts/*'

test:
- 'test/**'

documentation:
- '**/*.md'

docker:
- 'docker/**'

33 changes: 33 additions & 0 deletions .github/workflows/auto-pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Pull Request Labeler
on:
pull_request:
types:
- opened
- edited
- synchronize
jobs:
auto-label:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Find Current Pull Request
uses: jwalton/[email protected]
id: findPr
with:
# Can be "open", "closed", or "all". Defaults to "open".
state: open
- run: echo "PR Number is ${PR}"
if: success() && steps.findPr.outputs.number
env:
PR: ${{ steps.findPr.outputs.pr }}

- name: check pr pr-number
run: echo ${{ github.event.number }}

- uses: actions/labeler@v4
with:
dot: true
pr-number: ${{ steps.findPr.outputs.pr }}

21 changes: 21 additions & 0 deletions .github/workflows/check-pr-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PR Label Checker
on:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled

jobs:

check_labels:
name: Check PR labels
runs-on: ubuntu-latest
steps:
- uses: docker://agilepathway/pull-request-label-checker:latest
with:
any_of: documentation,enhancement,bug,cicd,test,breaking-change,feature,scripts
repo_token: ${{ secrets.GITHUB_TOKEN }}

18 changes: 18 additions & 0 deletions .github/workflows/lint-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint PR
on:
pull_request_target:
types:
- opened
- edited
- synchronize
jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
validateSingleCommit: true
validateSingleCommitMatchesPrTitle: true

0 comments on commit 9b403ac

Please sign in to comment.