Commit fd592398 authored by Dylan Griffith's avatar Dylan Griffith

Merge branch...

Merge branch '300567-okr-integrations-asana-review-and-revise-settings-related-ui-text' into 'master'

Review and revise Integrations/Asana UI text

See merge request gitlab-org/gitlab!57362
parents 193c4447 4137ec90
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
require 'asana' require 'asana'
class AsanaService < Service class AsanaService < Service
include ActionView::Helpers::UrlHelper
prop_accessor :api_key, :restrict_to_branch prop_accessor :api_key, :restrict_to_branch
validates :api_key, presence: true, if: :activated? validates :api_key, presence: true, if: :activated?
...@@ -11,20 +13,12 @@ class AsanaService < Service ...@@ -11,20 +13,12 @@ class AsanaService < Service
end end
def description def description
s_('AsanaService|Asana - Teamwork without email') s_('AsanaService|Add commit messages as comments to Asana tasks')
end end
def help def help
'This service adds commit messages as comments to Asana tasks. docs_link = link_to _('Learn more.'), Rails.application.routes.url_helpers.help_page_url('user/project/integrations/asana'), target: '_blank', rel: 'noopener noreferrer'
Once enabled, commit messages are checked for Asana task URLs s_('Add commit messages as comments to Asana tasks. %{docs_link}').html_safe % { docs_link: docs_link.html_safe }
(for example, `https://app.asana.com/0/123456/987654`) or task IDs
starting with # (for example, `#987654`). Every task ID found will
get the commit comment added to it.
You can also close a task with a message containing: `fix #123456`.
You can create a Personal Access Token here:
https://app.asana.com/0/developer-console'
end end
def self.to_param def self.to_param
...@@ -36,14 +30,17 @@ https://app.asana.com/0/developer-console' ...@@ -36,14 +30,17 @@ https://app.asana.com/0/developer-console'
{ {
type: 'text', type: 'text',
name: 'api_key', name: 'api_key',
title: _('API key'), title: 'API key',
placeholder: s_('AsanaService|User Personal Access Token. User must have access to task, all comments will be attributed to this user.'), help: s_('AsanaService|User Personal Access Token. User must have access to the task. All comments are attributed to this user.'),
# Example Personal Access Token from Asana docs
placeholder: '0/68a9e79b868c6789e79a124c30b0',
required: true required: true
}, },
{ {
type: 'text', type: 'text',
name: 'restrict_to_branch', name: 'restrict_to_branch',
placeholder: s_('AsanaService|Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches.') title: 'Restrict to branch (optional)',
help: s_('AsanaService|Comma-separated list of branches to be automatically inspected. Leave blank to include all branches.')
} }
] ]
end end
......
---
title: Review and revise Integrations/Asana UI text
merge_request: 57362
author:
type: other
...@@ -68,14 +68,14 @@ Example response: ...@@ -68,14 +68,14 @@ Example response:
## Asana ## Asana
Asana - Teamwork without email Add commit messages as comments to Asana tasks.
See also the [Asana service documentation](../user/project/integrations/asana.md).
### Create/Edit Asana service ### Create/Edit Asana service
Set Asana service for a project. Set Asana service for a project.
> This service adds commit messages as comments to Asana tasks. Once enabled, commit messages are checked for Asana task URLs (for example, `https://app.asana.com/0/123456/987654`) or task IDs starting with # (for example, `#987654`). Every task ID found gets the commit comment added to it. You can also close a task with a message containing: `fix #123456`. You can find your API Keys here: <https://developers.asana.com/docs/#authentication-basics>.
```plaintext ```plaintext
PUT /projects/:id/services/asana PUT /projects/:id/services/asana
``` ```
...@@ -84,8 +84,8 @@ Parameters: ...@@ -84,8 +84,8 @@ Parameters:
| Parameter | Type | Required | Description | | Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `api_key` | string | true | User API token. User must have access to task, all comments are attributed to this user. | | `api_key` | string | true | User API token. User must have access to task. All comments are attributed to this user. |
| `restrict_to_branch` | string | false | Comma-separated list of branches which are automatically inspected. Leave blank to include all branches. | | `restrict_to_branch` | string | false | Comma-separated list of branches to be are automatically inspected. Leave blank to include all branches. |
| `push_events` | boolean | false | Enable notifications for push events | | `push_events` | boolean | false | Enable notifications for push events |
### Delete Asana service ### Delete Asana service
......
---
stage: Create
group: Ecosystem
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
# Asana service **(FREE)**
This service adds commit messages as comments to Asana tasks.
Once enabled, commit messages are checked for Asana task URLs (for example,
`https://app.asana.com/0/123456/987654`) or task IDs starting with `#`
(for example, `#987654`). Every task ID found gets the commit comment added to it.
You can also close a task with a message containing: `fix #123456`.
You can use either of these words:
- `fix`
- `fixed`
- `fixes`
- `fixing`
- `close`
- `closes`
- `closed`
- `closing`
See also the [Asana service API documentation](../../../api/services.md#asana).
## Setup
In Asana, create a Personal Access Token.
[Learn about Personal Access Tokens in Asana](https://developers.asana.com/docs/personal-access-token).
Complete these steps in GitLab:
1. Go to the project you want to configure.
1. Go to the [Integrations page](overview.md#accessing-integrations).
1. Select **Asana**.
1. Ensure that the **Active** toggle is enabled.
1. Paste the token you generated in Asana.
1. (Optional) To restrict this setting to specific branches, list them in the **Restrict to branch**
field, separated with commas.
1. Select **Save changes** or optionally select **Test settings**.
<!-- ## Troubleshooting -->
...@@ -25,8 +25,7 @@ want to configure. ...@@ -25,8 +25,7 @@ want to configure.
Click on the service links to see further configuration instructions and details. Click on the service links to see further configuration instructions and details.
| Service | Description | Service Hooks | | Service | Description | Service Hooks |
| ------- | ----------- | ------------- | | Asana | Add commit messages as comments to Asana tasks | No |
| Asana | Asana - Teamwork without email | No |
| Assembla | Project Management Software (Source Commits Endpoint) | No | | Assembla | Project Management Software (Source Commits Endpoint) | No |
| [Atlassian Bamboo CI](bamboo.md) | A continuous integration and build server | Yes | | [Atlassian Bamboo CI](bamboo.md) | A continuous integration and build server | Yes |
| Buildkite | Continuous integration and deployments | Yes | | Buildkite | Continuous integration and deployments | Yes |
......
...@@ -1896,6 +1896,9 @@ msgstr "" ...@@ -1896,6 +1896,9 @@ msgstr ""
msgid "Add comment to design" msgid "Add comment to design"
msgstr "" msgstr ""
msgid "Add commit messages as comments to Asana tasks. %{docs_link}"
msgstr ""
msgid "Add deploy freeze" msgid "Add deploy freeze"
msgstr "" msgstr ""
...@@ -4176,13 +4179,13 @@ msgstr "" ...@@ -4176,13 +4179,13 @@ msgstr ""
msgid "AsanaService|%{user} pushed to branch %{branch} of %{project_name} ( %{commit_url} ):" msgid "AsanaService|%{user} pushed to branch %{branch} of %{project_name} ( %{commit_url} ):"
msgstr "" msgstr ""
msgid "AsanaService|Asana - Teamwork without email" msgid "AsanaService|Add commit messages as comments to Asana tasks"
msgstr "" msgstr ""
msgid "AsanaService|Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches." msgid "AsanaService|Comma-separated list of branches to be automatically inspected. Leave blank to include all branches."
msgstr "" msgstr ""
msgid "AsanaService|User Personal Access Token. User must have access to task, all comments will be attributed to this user." msgid "AsanaService|User Personal Access Token. User must have access to the task. All comments are attributed to this user."
msgstr "" msgstr ""
msgid "Ascending" msgid "Ascending"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment