### Start Gerrit Service
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/tools/utils/gerrit_setup/Readme.md
Use this command to initiate the Gerrit service on your workstation.
```bash
you@workstation $> make start-gerrit
```
--------------------------------
### Make a GET request with parameters
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/www/themes/common/tlp/doc/resources/fetch/get/doc.html
Use the 'get' function to query a URL, optionally passing parameters for filtering and pagination. Remember to await response.json() to parse the response body.
```javascript
const response = await get('/my/endpoint', {
params: {
limit: 10,
offset: 0
}
});
const data = await response.json();
```
--------------------------------
### Inline Code Example
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/www/themes/common/tlp/doc/resources/visual-assets/typo/paragraphs/example.html
Demonstrates how to use inline code formatting within the documentation.
```javascript
var tlp_code = this.is_my[tlp-code];
```
--------------------------------
### Make a GET request with Fetch init options
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/www/themes/common/tlp/doc/resources/fetch/get/doc.html
Pass Fetch API init options directly to the 'get' function for advanced request control, such as setting cache behavior.
```javascript
const response = await get('/my/endpoint', {
cache: 'force-cache'
});
const data = await response.json();
```
--------------------------------
### Import the get function
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/www/themes/common/tlp/doc/resources/fetch/get/doc.html
Import the 'get' function from the 'tlp' library to make API requests.
```javascript
import { get } from 'tlp';
```
--------------------------------
### Get Kanban Board Information
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Fetches the configuration and details of a specific Kanban board. Requires board ID and authentication.
```bash
curl -X GET "https://tuleap.example.com/api/kanban/123" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Get Workflow Transitions
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Fetch the available workflow transitions for a given tracker. Authentication is required.
```bash
curl -X GET "https://tuleap.example.com/api/trackers/123/workflow_transitions" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Get Tracker Details
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieve configuration details for a specific tracker using its ID.
```bash
curl -X GET "https://tuleap.example.com/api/trackers/123" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Autocomplete Months and Days
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/common/wiki/phpwiki/themes/Codendi/moacdropdown/examples.html
This example demonstrates switching between predefined lists of months and days. The 'months' and 'days' arrays must be defined in JavaScript.
```HTML
```
--------------------------------
### Grant Access to Support Project Documentation
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/tests/phpunit/common/Config/_fixtures/restricted_user_permissions.txt
Specify an array of project IDs for which support project documents and wiki should be accessible to all users. Note that the User Guide is always accessible. Default is project ID 1.
```php
//$allow_access_to_project_docs = array(1); // Support project documents and wiki (Note that the User Guide is always accessible)
```
--------------------------------
### Get Tracker Reports
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Fetch available reports for a given tracker. Authentication is required.
```bash
curl -X GET "https://tuleap.example.com/api/trackers/123/tracker_reports" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Autocomplete Months and Days
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/common/wiki/phpwiki/themes/Codendi-light-printer-version/moacdropdown/examples.html
This example demonstrates how to switch between different lists for autocompletion, such as months and days, using JavaScript functions to update the list.
```html
```
--------------------------------
### Get User by ID
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieve information for a specific user by providing their user ID.
```bash
curl -X GET "https://tuleap.example.com/api/users/456" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Get Tuleap Project Backlog Items
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieve a list of backlog items for a project, supporting pagination. Requires authentication.
```bash
# Get project backlog items
curl -X GET "https://tuleap.example.com/api/projects/123/backlog?limit=10&offset=0" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Get User Access Keys
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieves a list of access keys associated with a user, with options for pagination. Authentication is required.
```bash
curl -X GET "https://tuleap.example.com/api/users/123/access_keys?limit=50&offset=0" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Get Tracker Artifacts
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Fetch a list of artifacts within a specific tracker. Pagination parameters are supported.
```bash
curl -X GET "https://tuleap.example.com/api/trackers/123/artifacts?limit=50&offset=0" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Get Tuleap Project Git Repositories
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieve information about Git repositories within a project, supporting pagination and field selection. Requires authentication.
```bash
# Get project Git repositories
curl -X GET "https://tuleap.example.com/api/projects/123/git?limit=10&offset=0&fields=all" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Get Tuleap Project Trackers
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieve a list of trackers associated with a specific project, supporting pagination. Requires authentication.
```bash
# Get project trackers
curl -X GET "https://tuleap.example.com/api/projects/123/trackers?limit=10&offset=0" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Get Artifact with Complete Tracker Structure
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieve an artifact along with its complete tracker structure. Use `tracker_structure_format=complete`.
```bash
curl -X GET "https://tuleap.example.com/api/artifacts/123?tracker_structure_format=complete" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Initialize Tuleap Modal Instance
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/www/themes/common/tlp/doc/resources/flyover/modals/usage/doc.html
Explicitly call the modal in JavaScript to get a Modal instance. This instance can then be used to control the modal's visibility.
```javascript
var the_modal = tlp.modal('element-id');
```
--------------------------------
### Convert Select to Autocomplete
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/common/wiki/phpwiki/themes/Codendi-light-printer-version/moacdropdown/examples.html
This example shows how to transform a standard HTML select element into an autocomplete input field. The provided list of countries will be used for suggestions.
```html
Afghanistan Albania Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua And Barbuda Argentina Armenia Aruba Australia Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bermuda Bhutan Bolivia Bosnia And Herzegovina Botswana Bouvet Island Brazil British Indian Ocean Territory Brunei Darussalam Bulgaria Burkina Faso Burundi Cambodia Cameroon Canada Cape Verde Cayman Islands Central African Republic Chad Chile China Christmas Island Cocos (Keeling) Islands Colombia Comoros Congo Congo, The Democratic Republic Of The Cook Islands Costa Rica Co^te D'Ivoire Croatia Cuba Cyprus Czech Republic Denmark Djibouti Dominica Dominican Republic East Timor Ecuador Equatorial Guinea Eritrea Estonia Ethiopia Falkland Islands (Malvinas) Faroe Islands Fiji Finland France French Guiana French Polynesia French Southern Territories Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guinea Guinea-Bissau Guyana Haiti Heard Island And McDonald Islands Honduras Hong Kong Hungary Iceland India Indonesia Iran, Islamic Republic Of Iraq Ireland Israel Italy Jamaica Japan Jordan Kazakstan Kenya Kiribati Korea, Democratic People's Republic Of Korea, Republic Of Kuwait Kyrgyzstan Lao People's' Democratic Republic Latvia Lebanon Lesotho Liberia Libyan Arab Jamahiriya Liechtenstein Lithuania Luxembourg Macau Macedonia, The Former Yugoslav Republic Of Madagascar Malawi Malaysia Maldives Mali Malta Marshall Islands Martinique Mauritania Mauritius Mayotte Mexico Micronesia, Federated States Of Moldova, Republic Of Monaco Mongolia Montserrat Morocco Mozambique Myanmar Namibia Nauru Nepal Netherlands Netherlands Antilles New Caledonia New Zealand Nicaragua Niger Nigeria Niue Norfolk Island Northern Mariana Islands Norway Oman Pakistan Palau Palestinian Territory, Occupied Panama Papua New Guinea Paraguay Peru Philippines Pitcairn Poland Portugal Puerto Rico Qatar Re'union Romania Russian Federation Rwanda Saint Helena Saint Kitts And Nevis Saint Lucia Saint Pierre And Miquelon Saint Vincent And The Grenadines Salvador Samoa San Marino Sao Tome And Principe Saudi Arabia Senegal Seychelles Sierra Leone Singapore Slovakia Slovenia Solomon Islands Somalia South Africa South Georgia And The South Sandwich Islands Spain Sri Lanka Sudan Suriname Svalbard And Jan Mayen Swaziland Sweden Switzerland Syrian Arab Republic Taiwan Tajikistan Tanzania, United Republic Of Thailand Togo Tokelau Tonga Trinidad And Tobago Tunisia Turkey Turkmenistan Turks And Caicos Islands Tuvalu Uganda Ukraine United Arab Emirates United Kingdom United States United States Minor Outlying Islands Uruguay Uzbekistan Vanuatu Vatican City State (Holy See) Venezuela Viet Nam Virgin Islands, British Virgin Islands, U.S. Wallis And Futuna Western Sahara Yemen Yugoslavia Zambia Zimbabwe
```
--------------------------------
### Get Git Repository Tags
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieves a list of tags for a specific Git repository, including pagination parameters. Authentication is necessary.
```bash
curl -X GET "https://tuleap.example.com/api/git/456/tags?limit=50&offset=0" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Convert Select to Autocomplete Input
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/common/wiki/phpwiki/themes/Codendi/moacdropdown/examples.html
This example shows how to dynamically convert a standard HTML select element into an autocomplete input field. The list of countries is provided directly in the HTML.
```HTML
```
--------------------------------
### Initialize Select2 with Spaceship Name Prepend Badge
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/www/themes/common/tlp/doc/resources/forms/prepends/example.html
This example shows how to initialize a Select2 dropdown with a spaceship name prepend that includes a badge. This is typically used for read-only fields.
```javascript
tlp.select2(document.querySelector('#select2-prepend-badge'), {
placeholder: 'Choose an area',
allowClear: true
});
```
--------------------------------
### GET Request Function
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/www/themes/common/tlp/doc/resources/fetch/get/doc.html
The `get` function is used to make GET requests to the Tuleap API. It accepts a URL and optional configuration options.
```APIDOC
## GET /api
### Description
This endpoint is used to retrieve data from the Tuleap API.
### Method
GET
### Endpoint
`/api/{resource}`
### Parameters
#### Path Parameters
None
#### Query Parameters
* **params** (Object) - Optional - Parameters to be added to the query URL. These will be URI-encoded.
#### Request Body
None
### Request Example
```javascript
import { get } from 'tlp';
// Example with query parameters
const data = await get('/users', {
params: {
limit: 10,
offset: 0
}
});
// Example with fetch init options
const dataWithCache = await get('/projects', {
cache: 'force-cache'
});
```
### Response
#### Success Response (200)
* **data** (Object/Array) - The data returned from the API.
#### Response Example
```json
{
"example": "response body"
}
```
### Notes
* Remember to `await response.json();` to parse the response body.
```
--------------------------------
### Get Project Trackers with Callback
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/www/themes/common/tlp/doc/resources/fetch/recursive-get/example.html
Fetches a collection of trackers for a given project ID. The `recursiveGet` function calls the provided callback with the response.json() function on each request. The `getCollectionCallback` processes each batch of items and must return the collection.
```javascript
import { recursiveGet } from 'tlp'; // On each request, recursiveGet will call this callback with the response.json() function
function getCollectionCallback({ collection }) { // You can also leverage this callback to display this batch of items
displayABatchOfTrackers(collection);
// collection must be an [Array]
return collection;
}
async function getTrackersOfProject(project_id) {
return await recursiveGet('/api/v1/projects/' + project_id + '/trackers', {
params: {
// These parameters are JSON-encoded and URI-encoded
limit: 50,
query: {
is_open: true
}
},
getCollectionCallback
});
}
```
--------------------------------
### Constructing Welcome Email Body in PHP
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/site-content/en_US/admin/new_account_email.txt
This snippet constructs the main body of a welcome email for newly registered users. It includes the system name and provides links to help and user profile sections.
```php
) and finalize the setup of your User Profile (<". $base_url ."/account/>) "
."(Define your preferences, etc.)\n\n\nEnjoy the site, provide us with feedback on ways that we can improve "
.$GLOBALS['sys_name']." and speak of ".$GLOBALS['sys_name']." around you. \n\n\n-- The ".$GLOBALS['sys_name']." Team";
$title = "Account creation on ".$GLOBALS['sys_name']." !";
$section_one = "You are now a registered user on ".$GLOBALS['sys_name'].". As a registered user, you can now fully participate in the activities of the ".$GLOBALS['sys_name']." Web Site. "
."You may use forums, subscribe to mailing lists, browse through the list of hosted projects, or even start your own project.";
$section_two = "We highly recommend that you browse through the site, read the Site Documentation (<". $base_url ."/help/>) "
."and finalize the setup of your User Profile (<". $base_url ."/account/>) (Define your preferences, etc.)";
$section_three = "Enjoy the site, provide us with feedback on ways that we can improve" .$GLOBALS['sys_name']." and speak of ".$GLOBALS['sys_name']." around you.";
$thanks = "Thanks!";
$signature = "- The team at ".$GLOBALS['sys_name'];
$help = "For any help contact: ".$GLOBALS['sys_email_admin'];
$message = $title . "\n\n" . $section_one ."\n\n" . $section_two . "\n\n"
.$section_three. "\n\n" .$thanks. "\n\n" .$signature. "\n\n" .$help;
```
--------------------------------
### Get Single Artifact with All Field Values
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieve a specific artifact, including all its field values. Use `values_format=all` to get all fields.
```bash
curl -X GET "https://tuleap.example.com/api/artifacts/123?values_format=all" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Modal Options
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/www/themes/common/tlp/doc/resources/flyover/modals/usage/doc.html
Details the available options for configuring modal behavior during initialization.
```APIDOC
## Modal Initialization Options
### Description
When initializing a Tuleap modal, you can provide an optional `options` object to customize its behavior.
### Method
`tlp.modal(id, options)`
### Endpoint
N/A (JavaScript API)
### Parameters
#### Path Parameters
N/A
#### Query Parameters
N/A
#### Request Body
N/A
### Options Object
The `options` object can contain the following properties:
- **keyboard** (Boolean) - Optional, defaults to `true`
When `true`, enables closing the modal by pressing the ESC key.
- **destroy_on_hide** (Boolean) - Optional, defaults to `false`
When `true`, destroys the modal's event listeners when it is hidden. This is useful for dynamically created modals.
### Request Example
```javascript
// Initialize a modal with custom options
var myModal = tlp.modal('my-modal-element', {
keyboard: false, // Disable ESC key closing
destroy_on_hide: true // Destroy listeners on hide
});
```
### Response
N/A
### Response Example
N/A
```
--------------------------------
### Get tracker fields
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieves the fields associated with a specific tracker.
```APIDOC
## GET /api/tracker_fields/{tracker_id}
### Description
Retrieves the definition of fields for a given tracker.
### Method
GET
### Endpoint
/api/tracker_fields/{tracker_id}
### Headers
- **X-Auth-Token** (string) - Required - Authentication token.
- **X-Auth-UserId** (string) - Required - User ID for authentication.
### Response
#### Success Response (200)
- **fields** (array) - A list of field objects defining the tracker's structure.
### Request Example
```bash
curl -X GET "https://tuleap.example.com/api/tracker_fields/789" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
```
--------------------------------
### Get workflow transitions
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieves the possible workflow transitions for a specific tracker.
```APIDOC
## GET /api/trackers/{tracker_id}/workflow_transitions
### Description
Retrieves the available workflow transitions for a specified tracker.
### Method
GET
### Endpoint
/api/trackers/{tracker_id}/workflow_transitions
### Headers
- **X-Auth-Token** (string) - Required - Authentication token.
- **X-Auth-UserId** (string) - Required - User ID for authentication.
### Response
#### Success Response (200)
- **transitions** (array) - A list of workflow transition objects.
### Request Example
```bash
curl -X GET "https://tuleap.example.com/api/trackers/123/workflow_transitions" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
```
--------------------------------
### Get tracker reports
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieves a list of available reports for a specific tracker.
```APIDOC
## GET /api/trackers/{tracker_id}/tracker_reports
### Description
Retrieves a list of reports associated with a given tracker.
### Method
GET
### Endpoint
/api/trackers/{tracker_id}/tracker_reports
### Headers
- **X-Auth-Token** (string) - Required - Authentication token.
- **X-Auth-UserId** (string) - Required - User ID for authentication.
### Response
#### Success Response (200)
- **reports** (array) - A list of tracker report objects.
### Request Example
```bash
curl -X GET "https://tuleap.example.com/api/trackers/123/tracker_reports" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
```
--------------------------------
### Initialize Gerrit from Tuleap
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/tools/utils/gerrit_setup/Readme.md
These commands are executed within the Tuleap web container to register and set up Gerrit. Ensure you have the Gerrit admin password ready.
```bash
you@workstation $> make bash-web
root@tuleap-web $> /usr/share/tuleap/tools/utils/tuleap-dev.php register-ip gerrit
root@tuleap-web $> su - codendiadm
codendiadm@tuleap-web $> /usr/share/tuleap/tools/utils/tuleap-dev.php gerrit-setup --gerrit-admin-password %PASSWORD%
```
--------------------------------
### Get Pull Request Labels
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieve the labels associated with a pull request.
```bash
curl -X GET "https://tuleap.example.com/api/pull_requests/123/labels" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Create New Tuleap Project
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Create a new project by sending a POST request with project details in JSON format. Requires authentication and specific fields like shortname, label, and template_id.
```bash
# Create a new project
curl -X POST "https://tuleap.example.com/api/projects" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123" \
-d '{
"shortname": "new-project",
"description": "A new software project",
"label": "New Project",
"is_public": true,
"template_id": 100
}'
```
--------------------------------
### Modal Initialization and Methods
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/www/themes/common/tlp/doc/resources/flyover/modals/usage/doc.html
This snippet details how to initialize a Tuleap modal instance and use its core methods like show, hide, and toggle.
```APIDOC
## JavaScript Modal API
### Description
This section covers the initialization of Tuleap modals and the usage of their primary methods.
### Method
`tlp.modal(id, [options])`
### Endpoint
N/A (JavaScript API)
### Parameters
#### Path Parameters
N/A
#### Query Parameters
N/A
#### Request Body
N/A
### Initialization
To use the modal functionality, you must explicitly instantiate a modal using its element ID.
```javascript
var the_modal = tlp.modal('element-id');
```
This returns a `Modal` instance that provides the following methods:
### Methods
- `show()`: Displays the modal.
- `hide()`: Hides the modal.
- `toggle()`: Toggles the visibility of the modal.
### Request Example
```javascript
// Initialize a modal
var myModal = tlp.modal('my-modal-element');
// Show the modal
myModal.show();
// Hide the modal
myModal.hide();
// Toggle the modal
myModal.toggle();
```
### Response
N/A (Methods operate directly on the modal instance)
### Response Example
N/A
```
--------------------------------
### Get Tracker Fields
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieve the fields associated with a specific tracker. Requires authentication.
```bash
curl -X GET "https://tuleap.example.com/api/tracker_fields/789" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Initialize Dropdown with Options
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/www/themes/common/tlp/doc/resources/flyover/dropdowns/example.html
Initialize a dropdown with specific options, such as disabling keyboard navigation and specifying the dropdown menu element.
```javascript
tlp.dropdown( document.getElementById('dropdown-example-options'), {
keyboard : false,
dropdown_menu: document.getElementById('dropdown-menu-example-options'),
} );
```
--------------------------------
### Create Popovers with Various Placements
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/www/themes/common/tlp/doc/resources/flyover/popovers/example.html
Demonstrates different placement options for popovers relative to the trigger element. Each snippet shows a specific 'placement' configuration.
```javascript
placement: "top-start"
```
```javascript
placement: "top"
```
```javascript
placement: "top-end"
```
```javascript
placement: "right-start"
```
```javascript
placement: "right"
```
```javascript
placement: "right-end"
```
```javascript
placement: "bottom-start"
```
```javascript
placement: "bottom"
```
```javascript
placement: "bottom-end"
```
```javascript
placement: "left-start"
```
```javascript
placement: "left"
```
```javascript
placement: "left-end"
```
--------------------------------
### List Tuleap Projects with Pagination
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieve a list of accessible projects, supporting pagination with 'limit' and 'offset' query parameters. Requires authentication.
```bash
# List all accessible projects (with pagination)
curl -X GET "https://tuleap.example.com/api/projects?limit=10&offset=0" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Create Git Repository
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Initializes a new Git repository within a specified project. Requires project ID and repository name in the JSON payload.
```bash
curl -X POST "https://tuleap.example.com/api/git" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123" \
-d '{
"project_id": 123,
"name": "my-new-repo"
}'
```
--------------------------------
### Get Pull Request Comments
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieve comments associated with a pull request. Pagination is supported.
```bash
curl -X GET "https://tuleap.example.com/api/pull_requests/123/comments?limit=50&offset=0" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### My Custom Modal Controller
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/src/www/themes/common/tlp/doc/resources/angular/tlp-modal-service/example.html
The modal controller receives injected dependencies, including 'modal_instance' for modal control and resolved data/functions. Use $onInit for initialization logic, such as setting focus or adding event listeners.
```javascript
export default MyCustomModalController;
MyCustomModalController.$inject = [
//...
'modal_instance',
'my_custom_object',
'my_custom_function'
//...
];
function MyCustomModalController(
//...
modal_instance,
my_custom_object,
my_custom_function
//...
) {
const self = this;
// Use $onInit to run code when the controller is instanciated
self.$onInit = function() {
// Use modal_instance to access TLP's modal object
modal_instance.tlp_modal.addEventListener('tlp-modal-shown', () => {
// You can also access the modal's DOM this way
const input = modal_instance.tlp_modal.element.querySelector('.my-title-input');
if (input) {
input.focus();
};
});
modal_instance.tlp_modal.addEventListener('tlp-modal-hidden', () => {
// Using the "resolved" functions and objects
// This should log "76"
my_custom_function(my_custom_object.tracker_id);
});
}
}
```
--------------------------------
### Get Pull Request Details
Source: https://context7.com/gmpreussner/enalean.tuleap/llms.txt
Retrieve information about a specific pull request using its ID.
```bash
curl -X GET "https://tuleap.example.com/api/pull_requests/123" \
-H "X-Auth-Token: abc123xyz789" \
-H "X-Auth-UserId: 123"
```
--------------------------------
### Display File Upload Instructions (PHP)
Source: https://github.com/gmpreussner/enalean.tuleap/blob/master/site-content/en_US/file/qrs_attach_file.txt
This PHP snippet displays instructions for uploading files via Anonymous FTP or scp. It dynamically includes the username and domain.
```php