Skip to content

Commit

Permalink
Merge branch 'main' into nutrinet
Browse files Browse the repository at this point in the history
  • Loading branch information
teolemon authored Nov 17, 2024
2 parents d67fa96 + ed3a7de commit 35d3515
Show file tree
Hide file tree
Showing 6,841 changed files with 195,635 additions and 98,183 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
402 changes: 269 additions & 133 deletions .github/labeler.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/auto-assign-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign@v1.6.2
- uses: toshimaru/auto-author-assign@v2.1.1
44 changes: 44 additions & 0 deletions .github/workflows/build-additives.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build HTML pages for additives knowledge cards

on:
push
# Allow to be run manually
#workflow_dispatch:
#schedule:
#- cron: "0 19 * * *"

jobs:
update-assets:
if: github.repository_owner == 'openfoodfacts'
runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@v4

- name: Upgrade assets
run: |
cd knowledge_panels
python3 -m pip install -r requirements.txt --user
python3 build_html.py additives ingredients
- name: Check for uncommitted changes
id: check-changes
uses: mskri/[email protected]

- name: Create Pull Request
if: steps.check-changes.outputs.outcome == failure()
id: cpr
uses: peter-evans/create-pull-request@v7
with:
base: main
commit-message: Automated update of additives HTML files
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: auto-update-assets
delete-branch: true
title: 'chore: Update assets'
body: |
Automated update of additives HTML files
6 changes: 3 additions & 3 deletions .github/workflows/check_includes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Check Includes in HTML Templates
on:
push:
paths:
- '**.html'
- 'impossiblecondition**.html'
pull_request:
paths:
- '**.html'
- 'impossiblecondition**.html'

jobs:
check-includes:
Expand All @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin-per-language.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Matrix
uses: crowdin/github-action@v1.12.0
uses: crowdin/github-action@v2.3.0
with:
upload_translations: false # default is false
download_translations: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: crowdin action
uses: crowdin/github-action@v1.12.0
uses: crowdin/github-action@v2.3.0
with:
upload_translations: false # default is false
# Use this option to upload translations for a single specified language
Expand Down
102 changes: 101 additions & 1 deletion .github/workflows/github-projects.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
name: Add bugs to the Marketing @ Open Food Facts GitHub Project
name: Add bugs to the relevant Open Food Facts GitHub Projects

on:
issues:
types:
- opened
- edited
- transfered
- labeled
pull_request:
types:
- opened
- edited
jobs:
add-to-project:
name: Add issue to project
Expand All @@ -18,3 +22,99 @@ jobs:
project-url: https://github.com/orgs/openfoodfacts/projects/24
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
label-operator: AND
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/36 # Add issue to the open pet food facts project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🐾 Open Pet Food Facts
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/43 # Add issue to the open products facts project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 📸 Open Products Facts
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/37 # Add issue to the open beauty facts project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🧴 Open Beauty Facts
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/4 # Add issue to the packaging project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 📦 Packaging
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/25 # Add issue to the documentation project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 📚 Documentation
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/5 # Add issue to the folksonomy project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🏷️ Folksonomy Project
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/44 # Add issue to the data quality project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🧽 Data quality
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/82 # Add issue to the search project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🔎 Search
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/41 # Add issue to the producer platform project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🏭 Producers Platform
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/19 # Add issue to the infrastructure project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: infrastructure
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/92 # Add issue to the Nutri-Score project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🚦 Nutri-Score
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/132 # Add issue to the Top upvoted issues board
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: ⭐ top issue, 👍 Top 10 Issue!
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/57 # Add issue to the Most impactful issues board
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🎯 P0, 🎯 P1
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/35 # Add issue to the ♿️ accessibility project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: ♿️ accessibility
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/133 # Add issue to the Releases project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: autorelease:\pending
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/42 # Add issue to the Knowledge Panels issues board
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 📖 Knowledge panels
label-operator: OR
7 changes: 4 additions & 3 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
# file with configuration. For more information, see:
# https://github.com/actions/labeler

name: Labeler
on: [pull_request]
name: "Pull Request Labeler"
on:
- pull_request_target

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -21,6 +22,6 @@ jobs:
pull-requests: write

steps:
- uses: actions/labeler@v4
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
20 changes: 20 additions & 0 deletions .github/workflows/merge-conflict-autolabel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: '💥 Auto-Label Merge Conflicts on PRs'
on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: mschilde/auto-label-merge-conflicts@master
with:
CONFLICT_LABEL_NAME: "💥 Merge Conflicts"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAX_RETRIES: 5
WAIT_MS: 5000
17 changes: 16 additions & 1 deletion .github/workflows/preprod-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ concurrency:
jobs:
deploy:
runs-on: ubuntu-latest
# same concurrency as off-server staging deployment
environment: off-net
concurrency: off-net
steps:
- name: Checkout git repository
uses: appleboy/ssh-action@v1.0.0 # v0.1.4
uses: appleboy/ssh-action@v1.1.0
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
Expand All @@ -37,3 +38,17 @@ jobs:
git fetch --depth 1
# Checkout current commit SHA
git checkout -qf ${{ github.sha }}
# we need to restart staging backend to see deployed changes
- name: Restart staging backend
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
proxy_host: ${{ secrets.PROXY_HOST }}
proxy_username: ${{ secrets.USERNAME }}
proxy_key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
# Go to repository directory and restart backend
cd off-net
docker compose restart backend
18 changes: 9 additions & 9 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
#source_files: 2019-roadmap.html advanced-user-guide.html better-food-choices-for-a-better-health-lets-mobilize.html code-of-conduct.html contact.html contacts.html contribute-to-open-food-facts-by-playing.html contribute.html data.html dev-android.html dev-artificial-intelligence.html dev-emerging.html dev-general.html dev-ios.html dev-server.html development.html discover.html donate.html eco-score-the-environmental-impact-of-food-products.html education.html experimental-nutrition-score-france.html faq.html feuille-de-route-2012.html google-impact-challenge-on-climate.html google-summer-of-code.html graphs-in-3-clicks.html help-complete-products.html help-us-fill-up-on-fiber.html how-to-add-a-product.html how-to-complete-products-on-android.html index-pro.html index.html ingredient-detector.html iphone.html keyfacts.html legal.html logo-obf.html logo.html missions-texts.html missions.html mobile-app-open-food-facts.html nova.html numbers-selected.html nutrients-list.html nutriscore-formula.html nutriscore.html nutrition-score-france.html nutrition-score-uk.html nutrition-traffic-lights.html open-food-facts-and-the-nutriscore.html open-food-facts-vision-mission-values-and-programs.html open-food-hunt-2015.html operation-sodas.html partners.html presentations.html press-and-blogs.html press-old.html press.html presskit_de_CH_selection.html presskit_de_DE_selection.html presskit_en_AU_selection.html presskit_en_UK_selection.html presskit_es_ES_selection.html presskit_fr_BE_selection.html presskit_fr_CH_selection.html presskit_fr_FR_selection.html presskit_it_CH_selection.html presskit_it_IT_selection.html presskit_nl_BE_selection.html presskit_other_languages.html presskit_pt_BR_selection.html presskit_pt_PT_selection.html presskit_selection.html presskit_vi_VI_selection.html producers.html product-preferences.html products.html rateyourvendingmachine.html scan-parties.html science.html sendinblue.html sugar.html terms-of-use.html who-we-are.html
# task_name: HTML

validate_html:
name: Validate HTML5
runs-on: ubuntu-latest
# validate_html:
# name: Validate HTML5
# runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
# steps:
# - uses: actions/checkout@v4

- name: Run HTML5 validator
uses: Cyb3r-Jak3/[email protected]
with:
root: lang/en/texts/
# - name: Run HTML5 validator
# uses: Cyb3r-Jak3/[email protected]
# with:
# root: lang/en/texts/
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v3.7.11
- uses: googleapis/release-please-action@v4.1.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
products_stats_*.html
.venv
knowledge_panels/responses
__pycache__
.DS_Store
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changelog

## 1.0.0 (2024-09-25)


### Bug Fixes

* add some who-we-are links ([a6e776e](https://github.com/openfoodfacts/openfoodfacts-web/commit/a6e776e9db7a6c22564088ac99ded67b363ebfb7)), closes [#587](https://github.com/openfoodfacts/openfoodfacts-web/issues/587)
* fr symlinks and PT index.html ([67701a6](https://github.com/openfoodfacts/openfoodfacts-web/commit/67701a694058f1afeb0c6737060b670825c2e1df))
* remove bogus text ([25b1d59](https://github.com/openfoodfacts/openfoodfacts-web/commit/25b1d598ec397ab0ac44d83267e573103cd5cb94))

## 1.0.0 (2024-02-13)


### Features

* Create privacy.html ([8cf043c](https://github.com/openfoodfacts/openfoodfacts-web/commit/8cf043cc0c056b87d728f42aa45aed639d451350))
* follow-open-food-facts.html ([#526](https://github.com/openfoodfacts/openfoodfacts-web/issues/526)) ([268a958](https://github.com/openfoodfacts/openfoodfacts-web/commit/268a95823453cd807d8eb6c09488c565cd44c740))
* legal-and-privacy-emails ([#505](https://github.com/openfoodfacts/openfoodfacts-web/issues/505)) ([fe95a62](https://github.com/openfoodfacts/openfoodfacts-web/commit/fe95a62510dac87c042b2498525079c921345ee8))
* logos for Open Beauty Facts ([#540](https://github.com/openfoodfacts/openfoodfacts-web/issues/540)) ([4bf5c87](https://github.com/openfoodfacts/openfoodfacts-web/commit/4bf5c876f1bed47a5511c191a4ee9e35cbb7cb52))
* update Nutri-Score based on SpF recos ([fdb1a5a](https://github.com/openfoodfacts/openfoodfacts-web/commit/fdb1a5ad3ad1b123ca7acc4d75990d97a44fd025))


### Bug Fixes

* ADEME partner added ([#510](https://github.com/openfoodfacts/openfoodfacts-web/issues/510)) ([467b25b](https://github.com/openfoodfacts/openfoodfacts-web/commit/467b25ba79eb4c592d8c6a537a1217ccd2f050be))
* fixes for issues spotted by [@galnaf](https://github.com/galnaf) in privacy.html ([a0a2772](https://github.com/openfoodfacts/openfoodfacts-web/commit/a0a2772b8842bfc9365db0ce311b2475f4ffa3e1))
* legal.html ([0f9fc8a](https://github.com/openfoodfacts/openfoodfacts-web/commit/0f9fc8a952226292049944fa6434a07a606ccd93))
* OBF Symbolic links Italian ([#542](https://github.com/openfoodfacts/openfoodfacts-web/issues/542)) ([fa21864](https://github.com/openfoodfacts/openfoodfacts-web/commit/fa2186438489bd9a85e6abfd6cab918666507e94))
* privacy urls ([103abd2](https://github.com/openfoodfacts/openfoodfacts-web/commit/103abd2475f74f8c5c0ff0d1925f4e0eac6df5fa))
* udpate GSOC page ([#532](https://github.com/openfoodfacts/openfoodfacts-web/issues/532)) ([3032104](https://github.com/openfoodfacts/openfoodfacts-web/commit/3032104c787681985ed33198757e287c54a89671))
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ https://crowdin.com/project/openfoodfacts
* Once the pull request gets approved and merged, it will be deployed on the test server
* Deployment to production is still manual

## Requirements
* Do not hotlink ressources like images, JS or CSS. They need to be commited to the repository. Please organize resources in folders.


## Deployment

### Actual prod (no docker)
Expand Down
21 changes: 0 additions & 21 deletions crowdin-gic.yml

This file was deleted.

Loading

0 comments on commit 35d3515

Please sign in to comment.