Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions docs/source/contributeaction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ The Concore Action

Introduction
------------
This feature makes it easy for users to share their studies, examples, and program files. With this feature, you can contribute your work without having to use GitHub.
This feature makes it easy for users to share their studies, examples, and program files. With this feature, you can contribute your study without having to use GitHub.


How to use?
-----------

1. Creating a new Study
-----------------------

Using concore editor:

- Open **concore editor** by clicking on https://controlcore-project.github.io/concore-editor/
Expand All @@ -23,14 +26,16 @@ Using concore editor:
- Study Path - full directory path where the study is located as shown below.
- Author Name - name of the person who created that study

You can also provide the options arguments by clicking ``Show Advance Options`` button
You can also provide the ``optional`` arguments by clicking ``Show Advance Options`` button
- Branch Name - the branch name you want
- Title of Study - a short title which will displayed as title of pull request at github
- Description of Study - a description which will be displayed as body of the pull request at github


``Note: If you are not familiar with Github, we recommend you to skip the optional fields``

``Tip: To copy the file path , follow this right-click on the file > click on copy path``

.. image:: images/ce-contribute.png
:width: 700

Expand All @@ -45,10 +50,8 @@ Using concore editor:
:width: 700


``Note: Successful submission doesnot mean that your study is added to our repository, It will take time for us to review and accept the study.So, you can mention your email in the description field mentioned above so that if your study got accepted then we will let you know.``


Using command-line tools:
-------------------------

- pass the above mentioned arguments to the ``contribute`` command

Expand All @@ -58,4 +61,18 @@ Using command-line tools:

``./contribute heart F:\example parteek heart-study "Added heart study"``

It will create a Pull request authored by parteek, on a new branch named heart-study with title "Added heart study"
It will create a Pull request authored by parteek, on a new branch named heart-study with title "Added heart study"


2. Updating existing Study
--------------------------

- Make the changes in your local study

- Again create the PR either using concore-editor or CLI. Make sure the values for Author name, Study Name and Branch name (if entered before) should be the same as you entered before while contributing study

.. image:: images/ce-contribute-action-update-study.png
:width: 700


``Note: Successful submission doesnot mean that your study is added to our repository, It will take time for us to review and accept the study.So, you can mention your email in the description field mentioned above so that if your study got accepted then we will let you know.``
8 changes: 6 additions & 2 deletions docs/source/contributeactiondev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ This token is used to create branches and push studies to bot repo.After pushing

- Place the token in ``contribute.py`` script at https://github.com/ControlCore-Project/concore/blob/dev/contribute.py#L7

``Note: This token has max life time of 1 year and needs to be updated after this duration``

Creating token for workflow
---------------------------

This token is used to create pull request to upstream repo using bot account as author of pull request.

- Open ControlCore-Project account at Github
- Open ``concore-bot`` account at Github

- Create a Personal access token of bot account at https://github.com/settings/tokens/new

Expand All @@ -78,14 +79,17 @@ This token is used to create pull request to upstream repo using bot account as
.. image:: images/ca-workflow-token-generate.png
:width: 700

- Add this token as Github secret in bot repo at https://github.com/ControlCore-Project/concore-studies-staging/settings/secrets/actions/new with name ``token``
- Add this token as Github secret in bot repo at https://github.com/concore-bot/concore-studies/settings/secrets/actions/new with name ``token``

.. image:: images/ca-workflow-secret.png
:width: 700

- Click ``Add secret``


``Note: This token can have unlimited life span so it is just one-time setup``


Architecture
------------
- When ``contribute`` action is triggered it pushes local study to ``concore-bot/concore-studies`` repository
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/ce-contribute-success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.