Compare commits

..

22 commits

Author SHA1 Message Date
d3cca058c7 stash 2024-11-13 23:01:12 +01:00
d9d97010ad add issue_templates 2024-11-13 21:31:02 +01:00
b23e1005dd save raw_mails as file 2024-11-13 21:31:02 +01:00
89cc6614ac stash 2024-11-13 21:31:02 +01:00
1a739ec27f stash 2024-11-13 21:31:02 +01:00
679ee097a6 stash 2024-11-13 21:31:02 +01:00
f224a0dea5 stash 2024-11-13 21:31:02 +01:00
d6dc61b27a stash 2024-11-13 21:31:02 +01:00
5eacc3906d stash 2024-11-13 21:31:02 +01:00
234cd13198 stash 2024-11-13 21:31:02 +01:00
ef5113e3a4 stash 2024-11-13 21:31:02 +01:00
5453143ecb stash 2024-11-13 21:31:02 +01:00
eeed8b69de stash 2024-11-13 21:31:02 +01:00
c85388e3ca stash 2024-11-13 21:31:02 +01:00
e8811df1c4 stash 2024-11-13 21:31:02 +01:00
d5107a59e3 stash 2024-11-13 21:31:02 +01:00
0dea5ff451 stash 2024-11-13 21:31:02 +01:00
63d6b7a5a8 cicd: run on every pull request, but only deploy on testing
All checks were successful
/ test (pull_request) Successful in 52s
/ test (push) Successful in 54s
/ deploy (push) Successful in 4m45s
2024-11-12 17:05:03 +01:00
5ba4085e60 cicd: Run tests automatically
All checks were successful
/ test (push) Successful in 54s
/ deploy (push) Successful in 4m41s
2024-11-11 22:10:35 +01:00
be02a3e163 cicd: Deploy testing automatically
All checks were successful
/ deploy (push) Successful in 4m56s
2024-11-11 19:37:37 +00:00
444c2de16c change the ticket.state in the backend too 2024-11-10 19:01:45 +00:00
8831f67f00 ticket state changes to pending_open on first view 2024-11-10 19:01:45 +00:00
7 changed files with 147 additions and 54 deletions

View file

@ -0,0 +1,36 @@
name: Bug Report
about: File a bug report
labels:
- Kind/Bug
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Firefox (Windows)
- Firefox (MacOS)
- Firefox (Linux)
- Firefox (Android)
- Firefox (iOS)
- Chrome (Windows)
- Chrome (MacOS)
- Chrome (Linux)
- Chrome (Android)
- Chrome (iOS)
- Safari
- Microsoft Edge

View file

@ -0,0 +1,27 @@
name: 'New Feature'
about: 'This template is for new features'
labels:
- Kind/Feature
body:
- type: markdown
attributes:
value: |
Before creating a Feature Ticket, please check for duplicates.
- type: markdown
attributes:
value: |
### Implementation Checklist
- [ ] concept
- [ ] frontend
- [ ] backend
- [ ] unittests
- [ ] tested on staging
visible: [ content ]
- type: textarea
id: description
attributes:
label: 'Feature Description'
description: 'Explain the the feature.'
placeholder: Description
validations:
required: true

View file

@ -0,0 +1,20 @@
on:
pull_request:
jobs:
test:
runs-on: docker
container:
image: ghcr.io/catthehacker/ubuntu:act-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache-dependency-path: '**/requirements.dev.txt'
- name: Install dependencies
working-directory: core
run: pip3 install -r requirements.dev.txt
- name: Run django tests
working-directory: core
run: python3 manage.py test

View file

@ -0,0 +1,60 @@
on:
push:
branches:
- testing
jobs:
test:
runs-on: docker
container:
image: ghcr.io/catthehacker/ubuntu:act-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache-dependency-path: '**/requirements.dev.txt'
- name: Install dependencies
working-directory: core
run: pip3 install -r requirements.dev.txt
- name: Run django tests
working-directory: core
run: python3 manage.py test
deploy:
needs: [test]
runs-on: docker
steps:
- uses: actions/checkout@v4
- name: Install ansible
run: |
apt update -y
apt install python3-pip -y
python3 -m pip install ansible
python3 -m pip install ansible-lint
- name: Populate relevant files
run: |
mkdir ~/.ssh
echo "${{ secrets.C3LF_SSH_TESTING }}" > ~/.ssh/id_ed25519
chmod 0600 ~/.ssh/id_ed25519
ls -lah ~/.ssh
command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_ed25519
echo "andromeda.lab.or.it ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDXPoO0PE+B9PYwbGaLo98zhbmjAkp6eBtVeZe43v/+T" >> ~/.ssh/known_hosts
mkdir /etc/ansible
echo "${{ secrets.C3LF_INVENTORY_TESTING }}" > /etc/ansible/hosts
- name: Check ansible version
run: |
ansible --version
- name: List ansible hosts
run: |
ansible -m ping Andromeda
- name: Deploy testing
run: |
cd deploy/ansible
ansible-playbook playbooks/deploy-c3lf-sys3.yml

View file

@ -1,18 +0,0 @@
# Generated by Django 4.2.7 on 2024-11-06 06:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mail', '0005_alter_eventaddress_event'),
]
operations = [
migrations.AlterField(
model_name='eventaddress',
name='address',
field=models.CharField(max_length=255, unique=True),
),
]

View file

@ -1,36 +0,0 @@
# Generated by Django 4.2.7 on 2024-11-08 20:37
from django.core.files.base import ContentFile
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mail', '0006_alter_eventaddress_address'),
]
def move_raw_mails_to_file(apps, schema_editor):
Email = apps.get_model('mail', 'Email')
for email in Email.objects.all():
raw_content = email.raw
email.raw_file = ContentFile(raw_content)
email.raw = None
email.save()
operations = [
migrations.AddField(
model_name='email',
name='raw_file',
field=models.FileField(null=True, upload_to='raw_mail/'),
),
migrations.RunPython(move_raw_mails_to_file),
migrations.RemoveField(
model_name='email',
name='raw',
),
migrations.AlterField(
model_name='email',
name='raw_file',
field=models.FileField(upload_to='raw_mail/'),
),
]

View file

@ -125,6 +125,10 @@ export default {
}, },
mounted() { mounted() {
this.scheduleAfterInit(() => [Promise.all([this.fetchTicketStates(), this.loadTickets(), this.loadUsers(), this.fetchShippingVouchers()]).then(()=>{ this.scheduleAfterInit(() => [Promise.all([this.fetchTicketStates(), this.loadTickets(), this.loadUsers(), this.fetchShippingVouchers()]).then(()=>{
if (this.ticket.state == "pending_new"){
this.selected_state = "pending_open";
this.changeTicketStatus(this.ticket)
};
this.selected_state = this.ticket.state; this.selected_state = this.ticket.state;
this.selected_assignee = this.ticket.assigned_to this.selected_assignee = this.ticket.assigned_to
})]); })]);