From 44a0f86e3fa976ac0488108d9d79633dca4b9af5 Mon Sep 17 00:00:00 2001 From: norareidy Date: Tue, 12 Mar 2024 12:22:22 -0400 Subject: [PATCH 01/27] DOCSP-37618: Usage Examples landing page --- docs/usage-examples.txt | 94 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/usage-examples.txt diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt new file mode 100644 index 000000000..0dd0aaf01 --- /dev/null +++ b/docs/usage-examples.txt @@ -0,0 +1,94 @@ +.. _laravel-usage-examples: + +============== +Usage Examples +============== + +.. facet:: + :name: genre + :values: tutorial + +.. meta:: + :keywords: set up, runnable, code example + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +.. TODO: add usage examples to TOC as they're made + .. toctree:: + + +Overview +-------- + +Usage examples show runnable code examples to demonstrate frequently used MongoDB +operations. Each usage example includes the following: + +- Description of the MongoDB operation +- Code example that runs the MongoDB operation, which you can paste into your controller file +- Code example that specifies a view, which you can paste into your view file +- Output returned by the view + +How to Use the Usage Examples +----------------------------- + +The usage examples are designed to run operations on a MongoDB deployment that contains +the Atlas sample datasets. When you run the example code without the sample data, the output +might not match. + +Follow this tutorial to set up your MongoDB deployment with the sample data and run the +example code in your development environment. Before performing the following actions, +ensure that you create an Atlas account and deploy a cluster. For information about setting +up an account and a cluster, see the :atlas:`Get Started with Atlas Guide +`. + +.. procedure:: + :style: connected + + .. step:: Create a Laravel Application + + Follow the instructions in the :ref:`laravel-quick-start` guide to set up + a Laravel application. + + After completing the Quick Start, ensure that your application meets the following + requirements: + + - Connects to the ``movies`` collection in the Atlas sample datasets + - Contains the ``MovieController.php`` and ``browse_movies.blade.php`` files + + .. step:: Add the Usage Example Code to Your Application + + Copy the example code from the :guilabel:`Controller File Code` tab on the usage example + page and paste it into the ``MovieController.php`` file. + + Then, copy the example code from the :guilabel:`View File Code` tab and paste it into the + ``browse_movies.blade.php`` file. + + .. step:: Run the Usage Example Code + + Run the following command to start your Laravel application and run the MongoDB operation: + + .. code-block:: bash + + php artisan serve + +After completing these steps, you can see the output described in the **Expected Output** section +of the corresponding usage example. + +Available Usage Examples +------------------------ + +.. TODO: add usage examples to list as they're made + - :ref:`Find a Document ` + - :ref:`Find Multiple Documents ` + - :ref:`Insert a Document ` + - :ref:`Insert Multiple Documents ` + - :ref:`Update a Document ` + - :ref:`Update Multiple Documents ` + - :ref:`Delete a Document ` + - :ref:`Delete Multiple Documents ` + - :ref:`Count Documents ` + - :ref:`Retrieve Distinct Field Values ` From afc83e1c642c30cdbb776a9f0e088c0099229a93 Mon Sep 17 00:00:00 2001 From: norareidy Date: Tue, 12 Mar 2024 12:24:01 -0400 Subject: [PATCH 02/27] fix refs --- docs/usage-examples.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index 0dd0aaf01..3d8d32ebd 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -82,13 +82,13 @@ Available Usage Examples ------------------------ .. TODO: add usage examples to list as they're made - - :ref:`Find a Document ` - - :ref:`Find Multiple Documents ` - - :ref:`Insert a Document ` - - :ref:`Insert Multiple Documents ` - - :ref:`Update a Document ` - - :ref:`Update Multiple Documents ` - - :ref:`Delete a Document ` - - :ref:`Delete Multiple Documents ` - - :ref:`Count Documents ` + - :ref:`Find a Document ` + - :ref:`Find Multiple Documents ` + - :ref:`Insert a Document ` + - :ref:`Insert Multiple Documents ` + - :ref:`Update a Document ` + - :ref:`Update Multiple Documents ` + - :ref:`Delete a Document ` + - :ref:`Delete Multiple Documents ` + - :ref:`Count Documents ` - :ref:`Retrieve Distinct Field Values ` From f97fbb3bac55621c93f3c9d8f770a1e90eb8b24e Mon Sep 17 00:00:00 2001 From: norareidy Date: Tue, 12 Mar 2024 12:31:19 -0400 Subject: [PATCH 03/27] update TOC --- docs/index.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/index.txt b/docs/index.txt index cd210fed2..e54ab7523 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -14,6 +14,7 @@ Laravel MongoDB :maxdepth: 1 /quick-start + /usage-examples /retrieve /eloquent-models /query-builder @@ -46,10 +47,16 @@ Learn how to add {+odm-short+} to a Laravel web application, connect to MongoDB hosted on MongoDB Atlas, and begin working with data in the :ref:`laravel-quick-start` section. +Usage Examples +-------------- + +See fully runnable code examples and explanations of common +MongoDB operations in the :ref:`laravel-usage-examples` section. + Fundamentals ------------ -To learn how to perform the following tasks by using the {+odm-short+}, +To learn how to perform the following tasks by using {+odm-short+}, see the following content: - :ref:`laravel-fundamentals-retrieve` From 79a19c05f826b1d309ba7bd8868bc0bf34bf0df3 Mon Sep 17 00:00:00 2001 From: norareidy Date: Tue, 12 Mar 2024 14:25:03 -0400 Subject: [PATCH 04/27] format fix --- docs/usage-examples.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index 3d8d32ebd..6ff5f7b7c 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -78,10 +78,9 @@ up an account and a cluster, see the :atlas:`Get Started with Atlas Guide After completing these steps, you can see the output described in the **Expected Output** section of the corresponding usage example. -Available Usage Examples ------------------------- - .. TODO: add usage examples to list as they're made + Available Usage Examples + ------------------------ - :ref:`Find a Document ` - :ref:`Find Multiple Documents ` - :ref:`Insert a Document ` From 6edfb45a6748fb3ef2d1b478763cdd05937c0f3f Mon Sep 17 00:00:00 2001 From: norareidy Date: Wed, 13 Mar 2024 15:00:33 -0400 Subject: [PATCH 05/27] CC feedback --- docs/usage-examples.txt | 74 +++++++++++++---------------------------- 1 file changed, 24 insertions(+), 50 deletions(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index 6ff5f7b7c..6a393017c 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -17,77 +17,51 @@ Usage Examples :depth: 1 :class: singlecol -.. TODO: add usage examples to TOC as they're made - .. toctree:: - - Overview -------- Usage examples show runnable code examples to demonstrate frequently used MongoDB -operations. Each usage example includes the following: +operations. Each usage example includes the following components: -- Description of the MongoDB operation -- Code example that runs the MongoDB operation, which you can paste into your controller file -- Code example that specifies a view, which you can paste into your view file -- Output returned by the view +- Explanation of the MongoDB operation +- Example controller code that runs the MongoDB operation +- Example view code that renders the result +- Output displayed by the view -How to Use the Usage Examples +How to Run the Usage Examples ----------------------------- The usage examples are designed to run operations on a MongoDB deployment that contains -the Atlas sample datasets. When you run the example code without the sample data, the output -might not match. +the MongoDB Atlas sample datasets. When you run the example code without this sample data, +the output might not match. + +You can run the usage examples from the Laravel web application and MongoDB Atlas cluster that you +set up in the :ref:`laravel-quick-start`` guide. After completing the Quick Start, ensure that your +application meets the following requirements: -Follow this tutorial to set up your MongoDB deployment with the sample data and run the -example code in your development environment. Before performing the following actions, -ensure that you create an Atlas account and deploy a cluster. For information about setting -up an account and a cluster, see the :atlas:`Get Started with Atlas Guide -`. +- Connects to the ``movies`` collection in the Atlas sample datasets +- Contains the ``MovieController.php`` and ``browse_movies.blade.php`` files + +Then, follow this tutorial to add the usage example code to your Laravel application and view +the expected results. .. procedure:: :style: connected - .. step:: Create a Laravel Application - - Follow the instructions in the :ref:`laravel-quick-start` guide to set up - a Laravel application. - - After completing the Quick Start, ensure that your application meets the following - requirements: + .. step:: Add the Controller Code to Your Application - - Connects to the ``movies`` collection in the Atlas sample datasets - - Contains the ``MovieController.php`` and ``browse_movies.blade.php`` files - - .. step:: Add the Usage Example Code to Your Application - Copy the example code from the :guilabel:`Controller File Code` tab on the usage example page and paste it into the ``MovieController.php`` file. + + .. step:: Add the View Code to Your Application - Then, copy the example code from the :guilabel:`View File Code` tab and paste it into the - ``browse_movies.blade.php`` file. + Copy the example code from the :guilabel:`View File Code` tab on the usage example page and + paste it into the ``browse_movies.blade.php`` file. .. step:: Run the Usage Example Code - Run the following command to start your Laravel application and run the MongoDB operation: - - .. code-block:: bash - - php artisan serve + To run the example controller code and view the results, follow the instructions on the + usage example page. After completing these steps, you can see the output described in the **Expected Output** section of the corresponding usage example. - -.. TODO: add usage examples to list as they're made - Available Usage Examples - ------------------------ - - :ref:`Find a Document ` - - :ref:`Find Multiple Documents ` - - :ref:`Insert a Document ` - - :ref:`Insert Multiple Documents ` - - :ref:`Update a Document ` - - :ref:`Update Multiple Documents ` - - :ref:`Delete a Document ` - - :ref:`Delete Multiple Documents ` - - :ref:`Count Documents ` - - :ref:`Retrieve Distinct Field Values ` From 2885cc53569a30d5bb22ecfee2665c30c5b802ae Mon Sep 17 00:00:00 2001 From: norareidy Date: Wed, 13 Mar 2024 15:02:09 -0400 Subject: [PATCH 06/27] remove info --- docs/usage-examples.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index 6a393017c..db1b11532 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -31,10 +31,6 @@ operations. Each usage example includes the following components: How to Run the Usage Examples ----------------------------- -The usage examples are designed to run operations on a MongoDB deployment that contains -the MongoDB Atlas sample datasets. When you run the example code without this sample data, -the output might not match. - You can run the usage examples from the Laravel web application and MongoDB Atlas cluster that you set up in the :ref:`laravel-quick-start`` guide. After completing the Quick Start, ensure that your application meets the following requirements: From 301ff7470288a18ccadef71f364a3c3181bfdfdf Mon Sep 17 00:00:00 2001 From: norareidy Date: Wed, 13 Mar 2024 15:04:09 -0400 Subject: [PATCH 07/27] add back --- docs/usage-examples.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index db1b11532..6a393017c 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -31,6 +31,10 @@ operations. Each usage example includes the following components: How to Run the Usage Examples ----------------------------- +The usage examples are designed to run operations on a MongoDB deployment that contains +the MongoDB Atlas sample datasets. When you run the example code without this sample data, +the output might not match. + You can run the usage examples from the Laravel web application and MongoDB Atlas cluster that you set up in the :ref:`laravel-quick-start`` guide. After completing the Quick Start, ensure that your application meets the following requirements: From f08b2be3110d451237b87c7c14de7f48b49c084c Mon Sep 17 00:00:00 2001 From: norareidy Date: Wed, 13 Mar 2024 15:11:58 -0400 Subject: [PATCH 08/27] typo --- docs/usage-examples.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index 6a393017c..e8ae532cc 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -36,7 +36,7 @@ the MongoDB Atlas sample datasets. When you run the example code without this sa the output might not match. You can run the usage examples from the Laravel web application and MongoDB Atlas cluster that you -set up in the :ref:`laravel-quick-start`` guide. After completing the Quick Start, ensure that your +set up in the :ref:`laravel-quick-start` guide. After completing the Quick Start, ensure that your application meets the following requirements: - Connects to the ``movies`` collection in the Atlas sample datasets From e3af41b358835f4e4a8c82de6b7e1d49ed351b6d Mon Sep 17 00:00:00 2001 From: norareidy Date: Thu, 14 Mar 2024 12:01:10 -0400 Subject: [PATCH 09/27] CC feedback 2 --- docs/usage-examples.txt | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index e8ae532cc..0000ab5c6 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -35,33 +35,30 @@ The usage examples are designed to run operations on a MongoDB deployment that c the MongoDB Atlas sample datasets. When you run the example code without this sample data, the output might not match. +Before You Begin +~~~~~~~~~~~~~~~~ + You can run the usage examples from the Laravel web application and MongoDB Atlas cluster that you set up in the :ref:`laravel-quick-start` guide. After completing the Quick Start, ensure that your application meets the following requirements: -- Connects to the ``movies`` collection in the Atlas sample datasets -- Contains the ``MovieController.php`` and ``browse_movies.blade.php`` files - -Then, follow this tutorial to add the usage example code to your Laravel application and view -the expected results. - -.. procedure:: - :style: connected +- Configuration to use an Atlas cluster that contains the sample datasets +- ``Movie`` model configured to use the MongoDB database +- ``Movie`` view that lists the results +- HTTP and API controller endpoints for displaying and storing ``Movie`` data - .. step:: Add the Controller Code to Your Application - - Copy the example code from the :guilabel:`Controller File Code` tab on the usage example - page and paste it into the ``MovieController.php`` file. +Run the Examples +~~~~~~~~~~~~~~~~ - .. step:: Add the View Code to Your Application - - Copy the example code from the :guilabel:`View File Code` tab on the usage example page and - paste it into the ``browse_movies.blade.php`` file. +Each Usage Example page features example code in the :guilabel:`Controller File Code` and +:guilabel:`View File Code` tabs that you can copy and paste into your Laravel application. - .. step:: Run the Usage Example Code +Unless otherwise specified, you can add Usage Example sample code to your application by performing +the following actions: - To run the example controller code and view the results, follow the instructions on the - usage example page. +- Add the code from the :guilabel:`Controller File Code` tab to your ``MovieController.php`` file in the + ``app/Http/Controllers`` directory +- Add the code from the :guilabel:`View File Code` to your ``browse_movies.blade.php`` file in the + ``resources/views`` directory. -After completing these steps, you can see the output described in the **Expected Output** section -of the corresponding usage example. +Follow the instructions on the Usage Example page to run the code and view the expected output. From fc7970d1266bb039c00c6d5eb62fd091a9e5216b Mon Sep 17 00:00:00 2001 From: norareidy Date: Thu, 14 Mar 2024 13:18:18 -0400 Subject: [PATCH 10/27] add section toc --- docs/usage-examples.txt | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index 0000ab5c6..944bf325a 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -31,22 +31,32 @@ operations. Each usage example includes the following components: How to Run the Usage Examples ----------------------------- +To learn how to set up your application and run the usage examples, see the following +sections: + +- :ref:`before-start` +- :ref:`run-usage-examples` + +.. _before-start: + +Before You Get Started +~~~~~~~~~~~~~~~~~~~~~~ + The usage examples are designed to run operations on a MongoDB deployment that contains the MongoDB Atlas sample datasets. When you run the example code without this sample data, the output might not match. -Before You Begin -~~~~~~~~~~~~~~~~ - -You can run the usage examples from the Laravel web application and MongoDB Atlas cluster that you -set up in the :ref:`laravel-quick-start` guide. After completing the Quick Start, ensure that your -application meets the following requirements: +You can run the usage examples from the Laravel web application and MongoDB Atlas cluster that +you set up in the :ref:`laravel-quick-start` guide. After completing the Quick Start, ensure +that your application meets the following requirements: - Configuration to use an Atlas cluster that contains the sample datasets - ``Movie`` model configured to use the MongoDB database - ``Movie`` view that lists the results - HTTP and API controller endpoints for displaying and storing ``Movie`` data +.. _run-usage-examples: + Run the Examples ~~~~~~~~~~~~~~~~ From 9034064aa0d2d2b5ce9418e5c24a4ed1d3555285 Mon Sep 17 00:00:00 2001 From: norareidy Date: Mon, 18 Mar 2024 11:20:47 -0400 Subject: [PATCH 11/27] feedback, removing tabs --- .github/workflows/merge-up.yml | 33 --------------------------------- docs/quick-start/view-data.txt | 2 +- docs/usage-examples.txt | 26 +++++++++++++++++++------- 3 files changed, 20 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/merge-up.yml diff --git a/.github/workflows/merge-up.yml b/.github/workflows/merge-up.yml deleted file mode 100644 index a44a8501c..000000000 --- a/.github/workflows/merge-up.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Merge up - -on: - push: - branches: - - "[0-9]+.[0-9]+" - -permissions: - contents: write - pull-requests: write - -env: - GH_TOKEN: ${{ github.token }} - -jobs: - merge-up: - name: Create merge up pull request - runs-on: ubuntu-latest - - steps: - - name: Checkout - id: checkout - uses: actions/checkout@v4 - with: - # fetch-depth 0 is required to fetch all branches, not just the branch being built - fetch-depth: 0 - - - name: Create pull request - id: create-pull-request - uses: alcaeus/automatic-merge-up-action@main - with: - ref: ${{ github.ref_name }} - branchNamePattern: '.' diff --git a/docs/quick-start/view-data.txt b/docs/quick-start/view-data.txt index 35d53368c..1be17bb3f 100644 --- a/docs/quick-start/view-data.txt +++ b/docs/quick-start/view-data.txt @@ -1,4 +1,4 @@ -.. laravel-quick-start-view-data: +.. _laravel-quick-start-view-data: ================= View MongoDB Data diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index 944bf325a..7cf257b7a 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -50,25 +50,37 @@ You can run the usage examples from the Laravel web application and MongoDB Atla you set up in the :ref:`laravel-quick-start` guide. After completing the Quick Start, ensure that your application meets the following requirements: -- Configuration to use an Atlas cluster that contains the sample datasets +- Configuration to use an Atlas cluster that contains the sample datasets. - ``Movie`` model configured to use the MongoDB database - ``Movie`` view that lists the results - HTTP and API controller endpoints for displaying and storing ``Movie`` data +.. tip:: + + See the :ref:`laravel-quick-start-create-deployment` step of the Quick Start for instructions on + configuring an Atlas Cluster, and see the :ref:`laravel-quick-start-connect-to-mongodb` step for + instructions on connecting to the cluster. + + See the :ref:`laravel-quick-start-view-data` step of the Quick Start for instructions on creating + the model, view, and controller endpoints. + .. _run-usage-examples: Run the Examples ~~~~~~~~~~~~~~~~ -Each Usage Example page features example code in the :guilabel:`Controller File Code` and -:guilabel:`View File Code` tabs that you can copy and paste into your Laravel application. +Each Usage Example page features controller code that you can copy and paste into your Laravel application. Unless otherwise specified, you can add Usage Example sample code to your application by performing the following actions: -- Add the code from the :guilabel:`Controller File Code` tab to your ``MovieController.php`` file in the +- Add the code example to the ``show()`` method in your ``MovieController.php`` file, located in the ``app/Http/Controllers`` directory -- Add the code from the :guilabel:`View File Code` to your ``browse_movies.blade.php`` file in the - ``resources/views`` directory. +- Add the code from one of the following view files to your ``browse_movies.blade.php`` file, located in + the ``resources/views`` directory: + + - :github:`View one document ` + - :github:`View multiple documents ` -Follow the instructions on the Usage Example page to run the code and view the expected output. +Each Usage Example page specifies which view file to use for the operation and includes instructions +on how to run the code and view the expected output. From ab90497654ff8eca9c64b7bb11a9a1d1daf433ce Mon Sep 17 00:00:00 2001 From: norareidy Date: Mon, 18 Mar 2024 11:23:07 -0400 Subject: [PATCH 12/27] workflow file --- .github/workflows/merge-up.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/merge-up.yml diff --git a/.github/workflows/merge-up.yml b/.github/workflows/merge-up.yml new file mode 100644 index 000000000..eec79dab7 --- /dev/null +++ b/.github/workflows/merge-up.yml @@ -0,0 +1,30 @@ +name: Merge up + +on: + push: + branches: + - "[0-9]+.[0-9]+" + +env: + GH_TOKEN: ${{ secrets.MERGE_UP_TOKEN }} + +jobs: + merge-up: + name: Create merge up pull request + runs-on: ubuntu-latest + + steps: + - name: Checkout + id: checkout + uses: actions/checkout@v4 + with: + # fetch-depth 0 is required to fetch all branches, not just the branch being built + fetch-depth: 0 + token: ${{ secrets.MERGE_UP_TOKEN }} + + - name: Create pull request + id: create-pull-request + uses: alcaeus/automatic-merge-up-action@main + with: + ref: ${{ github.ref_name }} + branchNamePattern: '.' \ No newline at end of file From 9e0b2dc318e1dc378b5ab38dbcf6670fda46f32e Mon Sep 17 00:00:00 2001 From: norareidy Date: Mon, 18 Mar 2024 11:24:27 -0400 Subject: [PATCH 13/27] edits --- .github/workflows/merge-up.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/merge-up.yml b/.github/workflows/merge-up.yml index eec79dab7..8d53cdad3 100644 --- a/.github/workflows/merge-up.yml +++ b/.github/workflows/merge-up.yml @@ -26,5 +26,4 @@ jobs: id: create-pull-request uses: alcaeus/automatic-merge-up-action@main with: - ref: ${{ github.ref_name }} - branchNamePattern: '.' \ No newline at end of file + ref: ${{ github.ref_name }} \ No newline at end of file From 754422000c948ddf56c192c52b7e36e64b7a162e Mon Sep 17 00:00:00 2001 From: norareidy Date: Mon, 18 Mar 2024 11:26:14 -0400 Subject: [PATCH 14/27] fix --- .github/workflows/merge-up.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/merge-up.yml b/.github/workflows/merge-up.yml index 8d53cdad3..eec79dab7 100644 --- a/.github/workflows/merge-up.yml +++ b/.github/workflows/merge-up.yml @@ -26,4 +26,5 @@ jobs: id: create-pull-request uses: alcaeus/automatic-merge-up-action@main with: - ref: ${{ github.ref_name }} \ No newline at end of file + ref: ${{ github.ref_name }} + branchNamePattern: '.' \ No newline at end of file From fdca1ba8e632f2b9d77f7afd5602559c30b3205c Mon Sep 17 00:00:00 2001 From: norareidy Date: Mon, 18 Mar 2024 13:29:26 -0400 Subject: [PATCH 15/27] more CC feedback --- docs/usage-examples.txt | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index 7cf257b7a..6c5525f36 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -35,7 +35,7 @@ To learn how to set up your application and run the usage examples, see the foll sections: - :ref:`before-start` -- :ref:`run-usage-examples` +- :ref:`add-usage-examples` .. _before-start: @@ -64,23 +64,15 @@ that your application meets the following requirements: See the :ref:`laravel-quick-start-view-data` step of the Quick Start for instructions on creating the model, view, and controller endpoints. -.. _run-usage-examples: +.. _add-usage-examples: -Run the Examples -~~~~~~~~~~~~~~~~ +Add the Examples to Your Application +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Each Usage Example page features controller code that you can copy and paste into your Laravel application. -Unless otherwise specified, you can add Usage Example sample code to your application by performing -the following actions: +You can add Usage Example sample code to the ``MovieController.php`` file, located in the ``app/Http/Controllers`` +directory. Each Usage Example page specifies the following information: -- Add the code example to the ``show()`` method in your ``MovieController.php`` file, located in the - ``app/Http/Controllers`` directory -- Add the code from one of the following view files to your ``browse_movies.blade.php`` file, located in - the ``resources/views`` directory: - - - :github:`View one document ` - - :github:`View multiple documents ` - -Each Usage Example page specifies which view file to use for the operation and includes instructions -on how to run the code and view the expected output. +- The ``MovieController.php`` method into which you can paste the code +- How to run the operation and view the expected output From 7aa61f92ca035b4ff986c953e7255e0de753f560 Mon Sep 17 00:00:00 2001 From: norareidy Date: Mon, 18 Mar 2024 13:37:40 -0400 Subject: [PATCH 16/27] run -> use --- docs/usage-examples.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index 6c5525f36..21f2e3aab 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -28,7 +28,7 @@ operations. Each usage example includes the following components: - Example view code that renders the result - Output displayed by the view -How to Run the Usage Examples +How to Use the Usage Examples ----------------------------- To learn how to set up your application and run the usage examples, see the following From 8c3905c578324145b90b2d661f4acdb7ac33e0d5 Mon Sep 17 00:00:00 2001 From: norareidy Date: Wed, 20 Mar 2024 12:20:15 -0400 Subject: [PATCH 17/27] changes to running instructions --- docs/usage-examples.txt | 54 +++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index 21f2e3aab..57d9ee063 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -46,33 +46,45 @@ The usage examples are designed to run operations on a MongoDB deployment that c the MongoDB Atlas sample datasets. When you run the example code without this sample data, the output might not match. -You can run the usage examples from the Laravel web application and MongoDB Atlas cluster that -you set up in the :ref:`laravel-quick-start` guide. After completing the Quick Start, ensure -that your application meets the following requirements: +You can run the usage examples from the ``{+quickstart-app-name+}`` Laravel web application and +MongoDB Atlas cluster that you set up in the :ref:`laravel-quick-start` guide. After completing +the Quick Start, your application contains the following files: -- Configuration to use an Atlas cluster that contains the sample datasets. -- ``Movie`` model configured to use the MongoDB database -- ``Movie`` view that lists the results -- HTTP and API controller endpoints for displaying and storing ``Movie`` data - -.. tip:: - - See the :ref:`laravel-quick-start-create-deployment` step of the Quick Start for instructions on - configuring an Atlas Cluster, and see the :ref:`laravel-quick-start-connect-to-mongodb` step for - instructions on connecting to the cluster. - - See the :ref:`laravel-quick-start-view-data` step of the Quick Start for instructions on creating - the model, view, and controller endpoints. +- ``Movie.php``: defines a ``Movie`` model configured to use the MongoDB database +- ``MovieController.php``: contains controller functions to run MongoDB operations +- ``browse_movie.blade.php``: contains HTML code to view MongoDB documents +- ``api.php``: contains API routes that call controller functions .. _add-usage-examples: Add the Examples to Your Application ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Each Usage Example page features controller code that you can copy and paste into your Laravel application. +Each Usage Example page includes sample code that demonstrates a MongoDB operation. You can edit +the existing files in your ``{+quickstart-app-name+}`` application to run each operation +and view the expected output. + +To add the usage example, make the following changes to your ``{+quickstart-app-name+}`` files: + +- Add the code example to a controller function in the ``MovieController.php`` file +- Add an API route that calls the controller function to the ``api.php`` file + +To view the modified, inserted, or retrieved document, add the following return statement to the +``show()`` function in ``MovieController.php``: + +.. code-block:: php + + return view('browse_movies', [ + 'movies' => Movie::where() + ->get() + ]); + +Replace the ```` placeholder with a set of criteria that matches the document you want to +view. For more information on specifying a query filter, see the :ref:`laravel-fundamentals-retrieve` +guide. + +To run the usage example, start your application by running the following command: -You can add Usage Example sample code to the ``MovieController.php`` file, located in the ``app/Http/Controllers`` -directory. Each Usage Example page specifies the following information: +.. code-block:: bash -- The ``MovieController.php`` method into which you can paste the code -- How to run the operation and view the expected output + php artisan serve From 245412f3a96a252ef9a9c0107e1d36259765aff6 Mon Sep 17 00:00:00 2001 From: norareidy Date: Wed, 20 Mar 2024 13:41:09 -0400 Subject: [PATCH 18/27] turn back into steps --- docs/usage-examples.txt | 64 ++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index 57d9ee063..d9ad7d752 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -35,7 +35,7 @@ To learn how to set up your application and run the usage examples, see the foll sections: - :ref:`before-start` -- :ref:`add-usage-examples` +- :ref:`run-usage-examples` .. _before-start: @@ -51,40 +51,58 @@ MongoDB Atlas cluster that you set up in the :ref:`laravel-quick-start` guide. A the Quick Start, your application contains the following files: - ``Movie.php``: defines a ``Movie`` model configured to use the MongoDB database -- ``MovieController.php``: contains controller functions to run MongoDB operations +- ``MovieController.php``: contains controller functions to run database operations - ``browse_movie.blade.php``: contains HTML code to view MongoDB documents - ``api.php``: contains API routes that call controller functions -.. _add-usage-examples: +.. _run-usage-examples: -Add the Examples to Your Application -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Run the Usage Example +~~~~~~~~~~~~~~~~~~~~~ -Each Usage Example page includes sample code that demonstrates a MongoDB operation. You can edit -the existing files in your ``{+quickstart-app-name+}`` application to run each operation +Each Usage Example page includes sample code that demonstrates a MongoDB operation. You can +edit the existing files in your ``{+quickstart-app-name+}`` application to run each operation and view the expected output. -To add the usage example, make the following changes to your ``{+quickstart-app-name+}`` files: +.. procedure:: + :style: connected -- Add the code example to a controller function in the ``MovieController.php`` file -- Add an API route that calls the controller function to the ``api.php`` file + .. step:: Add the example to your application + + To add the usage example to your ``{+quickstart-app-name+}`` application, make the following + changes to your application files + + - Add the code example to a controller function in the ``MovieController.php`` file + - Add an API route that calls the controller function to the ``api.php`` file -To view the modified, inserted, or retrieved document, add the following return statement to the -``show()`` function in ``MovieController.php``: + .. step:: Pass a document to the ``browse_movies`` view + + To view the modified, inserted, or retrieved document, add the following return statement to the + ``show()`` function in ``MovieController.php``: + + .. code-block:: php + + return view('browse_movies', [ + 'movies' => Movie::where() + ->get() + ]); + + Replace the ```` placeholder with a set of criteria that matches the document you want to + view. For more information on specifying a query filter, see the :ref:`laravel-fundamentals-retrieve` + guide. + + .. step:: Run the example + + To run the usage example, start your application by running the following command: -.. code-block:: php + .. code-block:: bash - return view('browse_movies', [ - 'movies' => Movie::where() - ->get() - ]); + php artisan serve -Replace the ```` placeholder with a set of criteria that matches the document you want to -view. For more information on specifying a query filter, see the :ref:`laravel-fundamentals-retrieve` -guide. + .. step:: View the expected output -To run the usage example, start your application by running the following command: + To view the operation result, open the following URL in your web browser: -.. code-block:: bash + .. code-block:: bash - php artisan serve + http://127.0.0.1:8000/browse_movies \ No newline at end of file From e92f51b185d57081308593a951d13133bb3b0a42 Mon Sep 17 00:00:00 2001 From: norareidy Date: Wed, 20 Mar 2024 13:47:12 -0400 Subject: [PATCH 19/27] small fixes --- docs/usage-examples.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index d9ad7d752..0f2ecd152 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -14,7 +14,7 @@ Usage Examples .. contents:: On this page :local: :backlinks: none - :depth: 1 + :depth: 2 :class: singlecol Overview @@ -70,7 +70,7 @@ and view the expected output. .. step:: Add the example to your application To add the usage example to your ``{+quickstart-app-name+}`` application, make the following - changes to your application files + changes to your application files: - Add the code example to a controller function in the ``MovieController.php`` file - Add an API route that calls the controller function to the ``api.php`` file From 2fe5eb9f9f15ee34abb04100e7f03e414691f91f Mon Sep 17 00:00:00 2001 From: norareidy Date: Thu, 21 Mar 2024 13:31:36 -0400 Subject: [PATCH 20/27] more reworking --- docs/usage-examples.txt | 45 ++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index 0f2ecd152..2ead16fc6 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -25,14 +25,13 @@ operations. Each usage example includes the following components: - Explanation of the MongoDB operation - Example controller code that runs the MongoDB operation -- Example view code that renders the result - Output displayed by the view How to Use the Usage Examples ----------------------------- -To learn how to set up your application and run the usage examples, see the following -sections: +To learn how to run the usage examples by editing the ``{+quickstart-app-name+}`` :ref:`Quick Start +` application, see the following sections: - :ref:`before-start` - :ref:`run-usage-examples` @@ -53,7 +52,7 @@ the Quick Start, your application contains the following files: - ``Movie.php``: defines a ``Movie`` model configured to use the MongoDB database - ``MovieController.php``: contains controller functions to run database operations - ``browse_movie.blade.php``: contains HTML code to view MongoDB documents -- ``api.php``: contains API routes that call controller functions +- ``web.php``: defines web routes that call controller functions .. _run-usage-examples: @@ -69,31 +68,45 @@ and view the expected output. .. step:: Add the example to your application - To add the usage example to your ``{+quickstart-app-name+}`` application, make the following - changes to your application files: + If the usage example demonstrates a read operation, add the code example to the ``show()`` + function in the ``MovieController.php`` file. - - Add the code example to a controller function in the ``MovieController.php`` file - - Add an API route that calls the controller function to the ``api.php`` file + If the usage example demonstrates a write operation, you can add the example an existing + controller function in the ``MovieController.php`` file, which include ``create()``, ``edit()``, + and ``destroy()``. You can also create your own controller function to contain the sample code. - .. step:: Pass a document to the ``browse_movies`` view + .. step:: Return the result to a view - To view the modified, inserted, or retrieved document, add the following return statement to the + To view the results of a read operation, add the following return statement to the ``show()`` function in ``MovieController.php``: .. code-block:: php return view('browse_movies', [ - 'movies' => Movie::where() - ->get() + 'movies' => $ ]); - Replace the ```` placeholder with a set of criteria that matches the document you want to - view. For more information on specifying a query filter, see the :ref:`laravel-fundamentals-retrieve` - guide. + To view the number of documents that are inserted, modified, or deleted by a write operation, add + the following print statement to your controller function in ``MovieController.php``: + + .. code-block:: php + + print_r($) + + Replace the ```` placeholder with the variable name specified in the usage example. .. step:: Run the example - To run the usage example, start your application by running the following command: + To run the usage example, add the following route to your ``web.php`` file: + + .. code-block:: bash + + Route::get('/browse_movies/', [MovieController::class, '']); + + Replace the ```` placeholder with the name of the controller function that contains your + usage example code. + + Then, start your application by running the following command: .. code-block:: bash From 9faa171d4533eee4bc4d8e0ceeac1fb659072de1 Mon Sep 17 00:00:00 2001 From: norareidy Date: Thu, 21 Mar 2024 13:46:14 -0400 Subject: [PATCH 21/27] reword --- docs/usage-examples.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index 2ead16fc6..081887ba7 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -25,7 +25,7 @@ operations. Each usage example includes the following components: - Explanation of the MongoDB operation - Example controller code that runs the MongoDB operation -- Output displayed by the view +- Output displayed by the view or print statement How to Use the Usage Examples ----------------------------- @@ -71,7 +71,7 @@ and view the expected output. If the usage example demonstrates a read operation, add the code example to the ``show()`` function in the ``MovieController.php`` file. - If the usage example demonstrates a write operation, you can add the example an existing + If the usage example demonstrates a write operation, you can add the example to an existing controller function in the ``MovieController.php`` file, which include ``create()``, ``edit()``, and ``destroy()``. You can also create your own controller function to contain the sample code. @@ -114,7 +114,8 @@ and view the expected output. .. step:: View the expected output - To view the operation result, open the following URL in your web browser: + To view the expected output included on the usage example page, open the following URL in your web + browser: .. code-block:: bash From d2d9c9ce81af1879e09841dd8648e36dea129ad8 Mon Sep 17 00:00:00 2001 From: norareidy Date: Fri, 22 Mar 2024 13:55:19 -0400 Subject: [PATCH 22/27] reworking --- docs/usage-examples.txt | 94 +++++++++-------------------------------- 1 file changed, 20 insertions(+), 74 deletions(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index 081887ba7..ce70615a0 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -6,10 +6,10 @@ Usage Examples .. facet:: :name: genre - :values: tutorial + :values: reference .. meta:: - :keywords: set up, runnable, code example + :keywords: set up, runnable .. contents:: On this page :local: @@ -25,13 +25,13 @@ operations. Each usage example includes the following components: - Explanation of the MongoDB operation - Example controller code that runs the MongoDB operation -- Output displayed by the view or print statement +- Output displayed by the print statement How to Use the Usage Examples ----------------------------- -To learn how to run the usage examples by editing the ``{+quickstart-app-name+}`` :ref:`Quick Start -` application, see the following sections: +To learn how to add a usage example to your Laravel application and view the expected output, +see the following sections: - :ref:`before-start` - :ref:`run-usage-examples` @@ -41,82 +41,28 @@ To learn how to run the usage examples by editing the ``{+quickstart-app-name+}` Before You Get Started ~~~~~~~~~~~~~~~~~~~~~~ +You can run the usage examples from your own Laravel application or from the +``{+quickstart-app-name+}`` application created in the :ref:`laravel-quick-start` guide. + The usage examples are designed to run operations on a MongoDB deployment that contains -the MongoDB Atlas sample datasets. When you run the example code without this sample data, -the output might not match. +the MongoDB Atlas sample datasets. Before running the usage examples, ensure that you load +the sample data into the MongoDB cluster to which your application connects. Otherwise, the +operation output might not match the text included in the :guilabel:`View Output` tab of +the usage example page. -You can run the usage examples from the ``{+quickstart-app-name+}`` Laravel web application and -MongoDB Atlas cluster that you set up in the :ref:`laravel-quick-start` guide. After completing -the Quick Start, your application contains the following files: +.. tip:: -- ``Movie.php``: defines a ``Movie`` model configured to use the MongoDB database -- ``MovieController.php``: contains controller functions to run database operations -- ``browse_movie.blade.php``: contains HTML code to view MongoDB documents -- ``web.php``: defines web routes that call controller functions + For instructions on loading the sample data into a MongoDB cluster, see + :atlas:`Load Sample Data ` in the Atlas documentation. .. _run-usage-examples: Run the Usage Example ~~~~~~~~~~~~~~~~~~~~~ -Each Usage Example page includes sample code that demonstrates a MongoDB operation. You can -edit the existing files in your ``{+quickstart-app-name+}`` application to run each operation -and view the expected output. - -.. procedure:: - :style: connected - - .. step:: Add the example to your application - - If the usage example demonstrates a read operation, add the code example to the ``show()`` - function in the ``MovieController.php`` file. - - If the usage example demonstrates a write operation, you can add the example to an existing - controller function in the ``MovieController.php`` file, which include ``create()``, ``edit()``, - and ``destroy()``. You can also create your own controller function to contain the sample code. - - .. step:: Return the result to a view - - To view the results of a read operation, add the following return statement to the - ``show()`` function in ``MovieController.php``: - - .. code-block:: php - - return view('browse_movies', [ - 'movies' => $ - ]); - - To view the number of documents that are inserted, modified, or deleted by a write operation, add - the following print statement to your controller function in ``MovieController.php``: - - .. code-block:: php - - print_r($) - - Replace the ```` placeholder with the variable name specified in the usage example. - - .. step:: Run the example - - To run the usage example, add the following route to your ``web.php`` file: - - .. code-block:: bash - - Route::get('/browse_movies/', [MovieController::class, '']); - - Replace the ```` placeholder with the name of the controller function that contains your - usage example code. - - Then, start your application by running the following command: - - .. code-block:: bash - - php artisan serve - - .. step:: View the expected output - - To view the expected output included on the usage example page, open the following URL in your web - browser: - - .. code-block:: bash +Each usage example page includes sample code that demonstrates a MongoDB operation and prints +a result. To run the operation, you can copy the sample code to a controller endpoint in your +Laravel application. - http://127.0.0.1:8000/browse_movies \ No newline at end of file +To view the expected output of the operation, you can add a web route to your application that +calls the controller function and returns the result to a web interface. \ No newline at end of file From 7ad6bdc9737fa7dc6bd0d28b0c0ada22d7f314b7 Mon Sep 17 00:00:00 2001 From: norareidy Date: Fri, 22 Mar 2024 17:05:33 -0400 Subject: [PATCH 23/27] feedback --- docs/usage-examples.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/usage-examples.txt b/docs/usage-examples.txt index ce70615a0..bf14bba4a 100644 --- a/docs/usage-examples.txt +++ b/docs/usage-examples.txt @@ -24,7 +24,7 @@ Usage examples show runnable code examples to demonstrate frequently used MongoD operations. Each usage example includes the following components: - Explanation of the MongoDB operation -- Example controller code that runs the MongoDB operation +- Example code that you can run from an application controller - Output displayed by the print statement How to Use the Usage Examples @@ -47,7 +47,7 @@ You can run the usage examples from your own Laravel application or from the The usage examples are designed to run operations on a MongoDB deployment that contains the MongoDB Atlas sample datasets. Before running the usage examples, ensure that you load the sample data into the MongoDB cluster to which your application connects. Otherwise, the -operation output might not match the text included in the :guilabel:`View Output` tab of +operation output might not match the text included in the ``{+code-output-label+}`` tab of the usage example page. .. tip:: From 27dd0dd3fa5ebdfdb31d372372dccadbea2b4eee Mon Sep 17 00:00:00 2001 From: norareidy Date: Thu, 28 Mar 2024 16:43:26 -0400 Subject: [PATCH 24/27] newline --- .github/workflows/merge-up.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/merge-up.yml b/.github/workflows/merge-up.yml index eec79dab7..dd4f8e5e7 100644 --- a/.github/workflows/merge-up.yml +++ b/.github/workflows/merge-up.yml @@ -27,4 +27,5 @@ jobs: uses: alcaeus/automatic-merge-up-action@main with: ref: ${{ github.ref_name }} - branchNamePattern: '.' \ No newline at end of file + branchNamePattern: '.' + \ No newline at end of file From 9912b50a97aadcce78af3fe61539c1440e7d9652 Mon Sep 17 00:00:00 2001 From: norareidy Date: Thu, 28 Mar 2024 16:46:18 -0400 Subject: [PATCH 25/27] remove file --- .github/workflows/merge-up.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge-up.yml b/.github/workflows/merge-up.yml index dd4f8e5e7..a44a8501c 100644 --- a/.github/workflows/merge-up.yml +++ b/.github/workflows/merge-up.yml @@ -5,8 +5,12 @@ on: branches: - "[0-9]+.[0-9]+" +permissions: + contents: write + pull-requests: write + env: - GH_TOKEN: ${{ secrets.MERGE_UP_TOKEN }} + GH_TOKEN: ${{ github.token }} jobs: merge-up: @@ -20,7 +24,6 @@ jobs: with: # fetch-depth 0 is required to fetch all branches, not just the branch being built fetch-depth: 0 - token: ${{ secrets.MERGE_UP_TOKEN }} - name: Create pull request id: create-pull-request @@ -28,4 +31,3 @@ jobs: with: ref: ${{ github.ref_name }} branchNamePattern: '.' - \ No newline at end of file From 64afec504c1b98836814a3c01ddb16a07b12a24b Mon Sep 17 00:00:00 2001 From: norareidy Date: Thu, 28 Mar 2024 16:48:36 -0400 Subject: [PATCH 26/27] edits --- .github/workflows/merge-up.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/merge-up.yml b/.github/workflows/merge-up.yml index a44a8501c..c9c789a86 100644 --- a/.github/workflows/merge-up.yml +++ b/.github/workflows/merge-up.yml @@ -10,7 +10,7 @@ permissions: pull-requests: write env: - GH_TOKEN: ${{ github.token }} + GH_TOKEN: ${{ secrets.MERGE_UP_TOKEN }} jobs: merge-up: @@ -24,6 +24,7 @@ jobs: with: # fetch-depth 0 is required to fetch all branches, not just the branch being built fetch-depth: 0 + token: ${{ secrets.MERGE_UP_TOKEN }} - name: Create pull request id: create-pull-request From fc06d293fc6067d2bc5b3132bc220215df0d7d64 Mon Sep 17 00:00:00 2001 From: norareidy Date: Thu, 28 Mar 2024 16:49:23 -0400 Subject: [PATCH 27/27] fix --- .github/workflows/merge-up.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/merge-up.yml b/.github/workflows/merge-up.yml index c9c789a86..215c2d9ac 100644 --- a/.github/workflows/merge-up.yml +++ b/.github/workflows/merge-up.yml @@ -5,10 +5,6 @@ on: branches: - "[0-9]+.[0-9]+" -permissions: - contents: write - pull-requests: write - env: GH_TOKEN: ${{ secrets.MERGE_UP_TOKEN }}