Skip to content

Commit

Permalink
chore: Remove unused workflow files and github actions, update depend…
Browse files Browse the repository at this point in the history
…encies
  • Loading branch information
sojeda committed Aug 15, 2024
1 parent 3fe0a1d commit 3fa19c7
Show file tree
Hide file tree
Showing 23 changed files with 2,174 additions and 2,043 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ Please provide detailed steps for reproducing the issue.

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

- Firmware Version:
- Operating System:
- SDK version:
- Toolchain version:
* Firmware Version:
* Operating System:
* SDK version:
* Toolchain version:

## Failure Logs

Expand Down
24 changes: 11 additions & 13 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
# TaskTitle - [###](https://app.clickup.com/t/###)
# {0} - [{1}](https://app.clickup.com/t/{2})

## 💻 What type of change is this?

- [ ] 💎 Feature
- [ ] 🐛 Bug Fix
- [ ] 📝 Documentation Update
- [ ] 🎨 Styling
- [ ] 🧑‍💻 Code Refactor
- [ ] 🔥 Performance Improvements
- [ ] ✅ Test
- [ ] 🤖 Build / CI
{3}

## ⭐ Description

Expand All @@ -18,7 +11,7 @@ Please include a summary of the change and which issue is fixed. Please also inc
Example:
-->

For more background, see ticket **CU-#[in-progress].**
For more background, see ticket **{1}[in-progress].**

<!--
ONLY ADD SECTION IF A NEW PACKAGE IS ADDED
Expand All @@ -39,21 +32,26 @@ Please include before AND after screenshots of the change, or proof of test abou

### Before

![image](https://github.com/Light-it-labs/lightranet/assets/17851841/f55f13c3-0f79-4d38-a6d9-51444daf3c81)

### After

![image](https://github.com/Light-it-labs/lightranet/assets/17851841/38fd90e3-09e0-4af4-85e0-b8801d479f8c)


## 💬 Comments

<!--
Please describe any known issues, bugs, or unintended consequences with this change. Also, please include any additional comments you feel are relevant to the reviewer.
-->
Ex:
This pr is blocked by #1234.
Im awaiting backend changes to be merged before I can complete this, etc.
This
-->

## ✅ Checklist

- [ ] This PR can be merged (it is not a draft, work in progress, or blocked on another PR)
### To review
- [ ] I have tested this change locally in multiple screen sizes
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
Expand Down
42 changes: 42 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
draft:
- changed-files:
- any-glob-to-any-file: '**'

feature:
- head-branch: ['^feature', 'feature']

bugfix:
- head-branch: [ '^bugfix', 'bugfix' ]

hotfix:
- head-branch: [ '^hotfix', 'hotfix' ]

release:
- base-branch: 'main'

have testing:
- changed-files:
- any-glob-to-any-file: tests/**

migrations:
- changed-files:
- any-glob-to-any-file: database/migrations/**

dependencies:
- changed-files:
- any-glob-to-any-file: ['composer.**', 'package.**', 'package-lock.**', 'poetry.lock', 'yarn.lock', 'pnpm-lock.**']

change env:
- changed-files:
- any-glob-to-any-file: '.env.**'

include command:
- changed-files:
- any-glob-to-any-file: 'src/Shared/App/Console/**'

documentation:
- changed-files:
- any-glob-to-any-file: ['README.**', 'docs/**']

refactor:
- head-branch: [ '^refactor', 'refactor' ]
3 changes: 3 additions & 0 deletions .github/review-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
needs review:
- changed-files:
- any-glob-to-any-file: '**'
12 changes: 0 additions & 12 deletions .github/workflows/issues.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Labeler
on:
workflow_dispatch:
pull_request:
types:
- opened

jobs:
label:

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

12 changes: 0 additions & 12 deletions .github/workflows/pull-requests.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/review-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Review Labeler
on:
workflow_dispatch:
pull_request:
types:
- review_requested

jobs:
label:

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: ".github/review-label.yml"

remove_label:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-ecosystem/action-remove-labels@v1
with:
labels: draft

65 changes: 65 additions & 0 deletions .github/workflows/set-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Set PR title

on:
pull_request:
types:
- opened

jobs:
set-title:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- name: Set PR title
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { owner, repo, number: pull_number } = context.issue;
const pr = context.payload.pull_request;
const body = pr.body || '';
const branchName = pr.head.ref;
const baseBranch = pr.base.ref;
const changeTypes = {
feature: '- [x] 💎 Feature',
bugfix: '- [x] 🐛 Bug Fix',
hotfix: '- [x] 🔥 Hot Fix',
release: '- [x] 🚀 Release',
};
const format = (str, ...args) => {
return str.replace(/{(\d+)}/g, (match, number) => {
return typeof args[number] !== 'undefined' ? args[number] : match;
});
};
const today = new Date();
let title = `Invalid branch name 👀 (type/task-id/description)`;
let updatedBody = body;
if (["main", "master"].includes(baseBranch)) {
title = `[Release] vX.X.X 🚀 - ${today.toLocaleDateString('en-GB')}`;
updatedBody = '';
} else {
try {
const [type, id, description] = branchName.split('/');
const templateTitle = description.split("-").join(' ').replace(/\b\w/g, (l) => l.toUpperCase());
const taskCode = id.startsWith("CU-") ? id.split("CU-").join('') : id;
const typeOfChange = changeTypes[type] || '- [ ] Unknown Type';
title = `[${id}] ${templateTitle}`;
updatedBody = format(body, templateTitle, id, taskCode, typeOfChange);
} catch (e) {
}
}
await github.rest.pulls.update({
owner,
repo,
pull_number,
title,
body: updatedBody
});
55 changes: 0 additions & 55 deletions .github/workflows/tests.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/update-changelog.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ This step is not necessary when you use Docker.
1. Clone GitHub repo for this project locally:

```bash
git clone [email protected]:Light-it-labs/lightranet
git clone [email protected]:Light-it-labs/laravel
```

2. cd into your project and create a copy of your .env file

```bash
cd lightranet
cd laravel
cp .env.example .env
```

Expand Down Expand Up @@ -295,7 +295,7 @@ To access services in local environment with host aliases, add the following ali
2. Paste the following hosts aliases:

```bash
127.0.0.1 lightranet.test
127.0.0.1 laravel.test
127.0.0.1 db
127.0.0.1 s3
127.0.0.1 redis
Expand Down
Loading

0 comments on commit 3fa19c7

Please sign in to comment.