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 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 diff --git a/README.md b/README.md index 8a6fc0cf..558e1383 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,13 @@ 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. ### 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` diff --git a/app.py b/app.py index 9269c126..9a51c904 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.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 @@ -288,5 +286,5 @@ def get_xero_tenant_id(): return connection.tenant_id -if __name__ == "__main__": - app.run() +if __name__ == '__main__': + app.run(host='localhost', port=5000) diff --git a/requirements.txt b/requirements.txt index 8a398e92..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==0.2.1 \ 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