From c9f334855de7d9e44ecf14d3a1bc6113745ec78b Mon Sep 17 00:00:00 2001 From: SidneyAllen Date: Fri, 3 Jul 2020 09:16:33 -0700 Subject: [PATCH 01/17] update xero-python version 0.4.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8a398e92..e9eed8d2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,4 @@ git+https://github.com/ageis/flask-oauthlib.git@c5ea3ace957ceeeeab3cfb6556f32685 # Use development version of xero-python #git+ssh://git@github.com/xero-github/xero-python.git@020f780b4e2b48cb33746ae19ddab9fdf128e626#egg=xero-python -xero-python==0.2.1 \ No newline at end of file +xero-python==0.4.1 \ No newline at end of file From 3d354ed6e2b432edd4968ba94f3e093d138d6ffd Mon Sep 17 00:00:00 2001 From: Matt Arderne Date: Sat, 25 Jul 2020 10:26:35 +0000 Subject: [PATCH 02/17] Change app host to localhost Fix for my redirect URI issue https://github.com/XeroAPI/xero-python-oauth2-starter/issues/13 --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 9269c126..18a747d0 100644 --- a/app.py +++ b/app.py @@ -288,5 +288,5 @@ def get_xero_tenant_id(): return connection.tenant_id -if __name__ == "__main__": - app.run() +if __name__ == '__main__': + app.run(host='localhost', port=5000) From 0b21f74556b8ae2e18ca454b844bf02ecd659c9d Mon Sep 17 00:00:00 2001 From: SidneyAllen Date: Mon, 27 Jul 2020 15:11:05 -0700 Subject: [PATCH 03/17] Update to version 0.5.1 of SDK --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e9eed8d2..6f3a64c4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,4 @@ git+https://github.com/ageis/flask-oauthlib.git@c5ea3ace957ceeeeab3cfb6556f32685 # Use development version of xero-python #git+ssh://git@github.com/xero-github/xero-python.git@020f780b4e2b48cb33746ae19ddab9fdf128e626#egg=xero-python -xero-python==0.4.1 \ No newline at end of file +xero-python==0.5.1 \ No newline at end of file From 30438e24af67dbb4ce286978525ed44c51e7c117 Mon Sep 17 00:00:00 2001 From: SidneyAllen Date: Mon, 3 Aug 2020 12:02:00 -0700 Subject: [PATCH 04/17] update requirements --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6f3a64c4..9377d2c5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,4 @@ git+https://github.com/ageis/flask-oauthlib.git@c5ea3ace957ceeeeab3cfb6556f32685 # Use development version of xero-python #git+ssh://git@github.com/xero-github/xero-python.git@020f780b4e2b48cb33746ae19ddab9fdf128e626#egg=xero-python -xero-python==0.5.1 \ No newline at end of file +xero-python==1.0.5 \ No newline at end of file From c4c50a7acc31ef1152b3c734334b6eae380e3179 Mon Sep 17 00:00:00 2001 From: SidneyAllen Date: Fri, 7 Aug 2020 12:17:58 -0700 Subject: [PATCH 05/17] Update README --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 8a6fc0cf..3c390094 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Please use your Demo Company organisation for your testing. ### Prerequirements * python3.5+ installed * git installed +* SSH keys setup for your github profile. ### Download the code * Clone this repo to your local drive. @@ -21,6 +22,22 @@ Please use your Demo Company organisation for your testing. * Activate new virtual environment by running `source venv/bin/activate` * Install project dependencies by running `pip install -r requirements.txt` +### Troubleshooting +If you see an error when installing the project dependencies that looks something like ... + +``` +Please make sure you have the correct access rights +and the repository exists. +fatal: clone of 'git@github.com:mitsuhiko/flask-sphinx-themes.git' into submodule path '/private/var/folders/7d/_bchn9r12pn79fr63p88nhv80000gn/T/pip-build-myovpzcq/Flask-Session/docs/_themes' failed +Failed to clone 'docs/_themes'. Retry scheduled +git@github.com: Permission denied (publickey). +``` + +Please check that your SSH keys are setup for your github profile? +https://github.com/settings/keys + +We ran into some issues with the current version of Flask-Session and had to point to a specific commit and download that code into our project. But in order to do that your [SSH keys need to be config](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh). + ## Create a Xero App To obtain your API keys, follow these steps and create a Xero app From 69995ecff656a2b722eef721c1bbc459622a9e8f Mon Sep 17 00:00:00 2001 From: SidneyAllen Date: Fri, 21 Aug 2020 15:17:07 -0700 Subject: [PATCH 06/17] update version of xero-python --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 9377d2c5..5539cfc3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,4 @@ git+https://github.com/ageis/flask-oauthlib.git@c5ea3ace957ceeeeab3cfb6556f32685 # Use development version of xero-python #git+ssh://git@github.com/xero-github/xero-python.git@020f780b4e2b48cb33746ae19ddab9fdf128e626#egg=xero-python -xero-python==1.0.5 \ No newline at end of file +xero-python==1.0.8 \ No newline at end of file From 8766327c11de88108c9a468303ae2cd602378fd0 Mon Sep 17 00:00:00 2001 From: Sidney Maestre Date: Thu, 8 Oct 2020 16:39:06 -0700 Subject: [PATCH 07/17] Update requirements --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5539cfc3..e92316c3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,4 @@ git+https://github.com/ageis/flask-oauthlib.git@c5ea3ace957ceeeeab3cfb6556f32685 # Use development version of xero-python #git+ssh://git@github.com/xero-github/xero-python.git@020f780b4e2b48cb33746ae19ddab9fdf128e626#egg=xero-python -xero-python==1.0.8 \ No newline at end of file +xero-python==1.0.11 \ No newline at end of file From 976d325bcc8d02c5189bf1ab66fffa1b04e3f4e1 Mon Sep 17 00:00:00 2001 From: Sidney Maestre Date: Tue, 3 Nov 2020 14:16:14 -0800 Subject: [PATCH 08/17] update git ignore --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a6072fb7..5f633b6b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ venv config.py cache/ -__pycache__/ \ No newline at end of file +__pycache__/ + +.DS_Store +.vscode/* \ No newline at end of file From 2f3897161f553162d08a6df35820fd308fd572d5 Mon Sep 17 00:00:00 2001 From: Sidney Maestre Date: Tue, 3 Nov 2020 14:26:28 -0800 Subject: [PATCH 09/17] update requirements --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e92316c3..ec302d2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,4 @@ git+https://github.com/ageis/flask-oauthlib.git@c5ea3ace957ceeeeab3cfb6556f32685 # Use development version of xero-python #git+ssh://git@github.com/xero-github/xero-python.git@020f780b4e2b48cb33746ae19ddab9fdf128e626#egg=xero-python -xero-python==1.0.11 \ No newline at end of file +xero-python==1.0.13 \ No newline at end of file From aa4af3a8382e2b6d27c5bd18007c94ee32381d25 Mon Sep 17 00:00:00 2001 From: Sidney Maestre Date: Thu, 12 Nov 2020 10:59:08 -0800 Subject: [PATCH 10/17] update version of xero-python to 1.1.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ec302d2f..1eda0d62 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,4 @@ git+https://github.com/ageis/flask-oauthlib.git@c5ea3ace957ceeeeab3cfb6556f32685 # Use development version of xero-python #git+ssh://git@github.com/xero-github/xero-python.git@020f780b4e2b48cb33746ae19ddab9fdf128e626#egg=xero-python -xero-python==1.0.13 \ No newline at end of file +xero-python==1.1.0 \ No newline at end of file From f6799ba5a8b2e767a1b1b09204cc61ab6be17e97 Mon Sep 17 00:00:00 2001 From: Sidney Maestre Date: Fri, 29 Jan 2021 17:27:56 -0800 Subject: [PATCH 11/17] update version of xero-python in requirments.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1eda0d62..d40a6c88 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,4 @@ git+https://github.com/ageis/flask-oauthlib.git@c5ea3ace957ceeeeab3cfb6556f32685 # Use development version of xero-python #git+ssh://git@github.com/xero-github/xero-python.git@020f780b4e2b48cb33746ae19ddab9fdf128e626#egg=xero-python -xero-python==1.1.0 \ No newline at end of file +xero-python==1.3.0 \ No newline at end of file From a8a0a7fac34a7a8bbf886d1cd50594f5c737159b Mon Sep 17 00:00:00 2001 From: Sidney Maestre Date: Mon, 19 Apr 2021 12:39:58 -0700 Subject: [PATCH 12/17] Update requirements.txt --- requirements.txt | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/requirements.txt b/requirements.txt index d40a6c88..defe4ab4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,4 @@ flask -# Werkzeug<1.0 # flask-session not compatible -# see https://github.com/fengsp/flask-session/pull/114 -# using patched version of flask-session -git+https://github.com/SqrtMinusOne/flask-session.git@560d00f1a84a9924d788a4f4e1ef35c5cf94c76d#egg=Flask-Session -# Werkzeug<1.0 # flask-oauthlib not compatible -# using patched version of flask-oauthlib -git+https://github.com/ageis/flask-oauthlib.git@c5ea3ace957ceeeeab3cfb6556f32685ff292eab#egg=Flask-OAuthlib - -# Use development version of xero-python -#git+ssh://git@github.com/xero-github/xero-python.git@020f780b4e2b48cb33746ae19ddab9fdf128e626#egg=xero-python -xero-python==1.3.0 \ No newline at end of file +flask-session==0.3.2 +flask-oauthlib==0.9.6 +xero-python==1.5.3 \ No newline at end of file From cf2ca46b7f06327478f4712f850d5bdc21b75584 Mon Sep 17 00:00:00 2001 From: Sidney Maestre Date: Mon, 19 Apr 2021 13:43:27 -0700 Subject: [PATCH 13/17] Update app.py --- app.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 18a747d0..02990843 100644 --- a/app.py +++ b/app.py @@ -45,10 +45,8 @@ access_token_url="https://identity.xero.com/connect/token", refresh_token_url="https://identity.xero.com/connect/token", scope="offline_access openid profile email accounting.transactions " - "accounting.transactions.read accounting.reports.read " - "accounting.journals.read accounting.settings accounting.settings.read " - "accounting.contacts accounting.contacts.read accounting.attachments " - "accounting.attachments.read assets projects", + "accounting.reports.read accounting.journals.read accounting.settings " + "accounting.contacts accounting.attachments assets projects", ) # type: OAuth2Application From 0e6970b58fa87a53f9ec07bd3d412de30d7ce73c Mon Sep 17 00:00:00 2001 From: Sidney Maestre Date: Mon, 19 Apr 2021 13:44:23 -0700 Subject: [PATCH 14/17] Update README remove troubleshooting for setting up SSH keys to pull patched versions of libraries. --- README.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/README.md b/README.md index 3c390094..53eeaa31 100644 --- a/README.md +++ b/README.md @@ -22,22 +22,6 @@ Please use your Demo Company organisation for your testing. * Activate new virtual environment by running `source venv/bin/activate` * Install project dependencies by running `pip install -r requirements.txt` -### Troubleshooting -If you see an error when installing the project dependencies that looks something like ... - -``` -Please make sure you have the correct access rights -and the repository exists. -fatal: clone of 'git@github.com:mitsuhiko/flask-sphinx-themes.git' into submodule path '/private/var/folders/7d/_bchn9r12pn79fr63p88nhv80000gn/T/pip-build-myovpzcq/Flask-Session/docs/_themes' failed -Failed to clone 'docs/_themes'. Retry scheduled -git@github.com: Permission denied (publickey). -``` - -Please check that your SSH keys are setup for your github profile? -https://github.com/settings/keys - -We ran into some issues with the current version of Flask-Session and had to point to a specific commit and download that code into our project. But in order to do that your [SSH keys need to be config](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh). - ## Create a Xero App To obtain your API keys, follow these steps and create a Xero app From 2068b7898e90d51f9cc13fc2752521a36b7f8b53 Mon Sep 17 00:00:00 2001 From: wobinb Date: Fri, 14 May 2021 16:08:17 +0100 Subject: [PATCH 15/17] Update README.md corrected typo on path --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 53eeaa31..558e1383 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Please use your Demo Company organisation for your testing. * Clone this repo to your local drive. ### Local installation -* Open terminal window and navigate to your `xero-python-oauth-starter` local drive directory +* Open terminal window and navigate to your `xero-python-oauth2-starter` local drive directory * Create new python virtual environment by running `python3 -m venv venv` * Activate new virtual environment by running `source venv/bin/activate` * Install project dependencies by running `pip install -r requirements.txt` From d7f50aa00e82739ece76b2e6ad7ff3f44302021a Mon Sep 17 00:00:00 2001 From: Rett Behrens Date: Thu, 2 Feb 2023 14:42:59 -0700 Subject: [PATCH 16/17] adds more github actions --- .github/workflows/jira_create_issue.yml | 11 +++++++++++ .github/workflows/jira_update_issue_closed.yml | 11 +++++++++++ .github/workflows/jira_update_issue_reopen.yml | 11 +++++++++++ 3 files changed, 33 insertions(+) create mode 100644 .github/workflows/jira_create_issue.yml create mode 100644 .github/workflows/jira_update_issue_closed.yml create mode 100644 .github/workflows/jira_update_issue_reopen.yml diff --git a/.github/workflows/jira_create_issue.yml b/.github/workflows/jira_create_issue.yml new file mode 100644 index 00000000..c8534823 --- /dev/null +++ b/.github/workflows/jira_create_issue.yml @@ -0,0 +1,11 @@ +name: Create Issue in Jira + +on: + issues: + types: + - opened + +jobs: + create_jira_issue: + uses: XeroAPI/Xero-OpenAPI/.github/workflows/jira_create_issue.yml@master + secrets: inherit diff --git a/.github/workflows/jira_update_issue_closed.yml b/.github/workflows/jira_update_issue_closed.yml new file mode 100644 index 00000000..a9f6ac31 --- /dev/null +++ b/.github/workflows/jira_update_issue_closed.yml @@ -0,0 +1,11 @@ +name: Update Jira Ticket Status To Done + +on: + issues: + types: + - closed + +jobs: + create_jira_issue: + uses: XeroAPI/Xero-OpenAPI/.github/workflows/jira_update_issue_closed.yml@master + secrets: inherit diff --git a/.github/workflows/jira_update_issue_reopen.yml b/.github/workflows/jira_update_issue_reopen.yml new file mode 100644 index 00000000..e883ac68 --- /dev/null +++ b/.github/workflows/jira_update_issue_reopen.yml @@ -0,0 +1,11 @@ +name: Update Jira Ticket Status To Backlog + +on: + issues: + types: + - reopened + +jobs: + create_jira_issue: + uses: XeroAPI/Xero-OpenAPI/.github/workflows/jira_update_issue_reopen.yml@master + secrets: inherit From e321814ec9cdbbac073d1d26178302f259753916 Mon Sep 17 00:00:00 2001 From: manishT72x Date: Mon, 13 May 2024 23:13:40 +0530 Subject: [PATCH 17/17] update scopes --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 02990843..9a51c904 100644 --- a/app.py +++ b/app.py @@ -45,8 +45,8 @@ access_token_url="https://identity.xero.com/connect/token", refresh_token_url="https://identity.xero.com/connect/token", scope="offline_access openid profile email accounting.transactions " - "accounting.reports.read accounting.journals.read accounting.settings " - "accounting.contacts accounting.attachments assets projects", + "accounting.journals.read accounting.transactions payroll.payruns accounting.reports.read " + "files accounting.settings.read accounting.settings accounting.attachments payroll.payslip payroll.settings files.read openid assets.read profile payroll.employees projects.read email accounting.contacts.read accounting.attachments.read projects assets accounting.contacts payroll.timesheets accounting.budgets.read", ) # type: OAuth2Application