PHPackages                             lightspeeddevelopment/tour-operator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lightspeeddevelopment/tour-operator

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

lightspeeddevelopment/tour-operator
===================================

The Tour Operators Plugin provides 3 post types (Accommodations, Destinations and Tours) that are the core of any Tour Operator. Use them to build day-by-day itineraries for tours.

2.1.1(4mo ago)141[267 issues](https://github.com/lightspeedwp/tour-operator/issues)[2 PRs](https://github.com/lightspeedwp/tour-operator/pulls)GPL-3.0-or-laterPHPPHP &gt;=8.0CI failing

Since Jan 15Pushed 4d ago5 watchersCompare

[ Source](https://github.com/lightspeedwp/tour-operator)[ Packagist](https://packagist.org/packages/lightspeeddevelopment/tour-operator)[ RSS](/packages/lightspeeddevelopment-tour-operator/feed)WikiDiscussions develop Synced 5d ago

READMEChangelog (10)Dependencies (4)Versions (24)Used By (0)

Projects Bot
------------

[](#projects-bot)

**Purpose.** Automates labels and syncs Issues/PRs into GitHub Projects (Status / Priority / Type) across LightSpeed repos. Runs entirely in GitHub Actions using a GitHub App installation token—no external server, no user OAuth.

**What it does.**

- Applies labels on Issues/PRs (file‑ and branch‑based) and enforces exactly one `status:*`.
- Adds Issues/PRs to your Project (Beta) and updates **Status / Priority / Type** from labels &amp; PR branch prefix.
- Nudges PRs without a changelog category via `meta:needs-changelog`.

**Workflows.**

- `.github/workflows/labels-issues-prs.yml` – Issue &amp; PR labelling
- `.github/workflows/project-meta-sync.yml` – Add to Project + field sync
- `.github/labeler.yml` – label rules (file globs &amp; branch regex)

**Required Project fields.** Single‑select options must match these values (or update the workflow mapping):

- **Status** → `Triage`, `Ready`, `In progress`, `In review`, `In QA`, `Blocked`, `Done`
- **Priority** → `Critical`, `Important`, `Normal`, `Minor`
- **Type** (optional) → `Feature`, `Bug`, `Documentation`, `Task`

**GitHub App (recommended).**

- **Org permissions:** Projects **Read &amp; write**.
- **Repo permissions:** Issues **Read**, Pull requests **Read**, Contents **Read**.
- **Secrets/variables:**
    - `LS_APP_ID` (org/repo **variable**): your App ID
    - `LS_APP_PRIVATE_KEY` (org/repo **secret**): your App private key (PEM)
    - `LS_PROJECT_URL` (org/repo **variable**): e.g. `https://github.com/orgs/LightSpeed/projects/1`
- The sync workflow mints an installation token with `actions/create-github-app-token@v2` and passes it to the project steps.

**PAT fallback (optional).** If you can’t use a GitHub App, set `LS_PROJECT_PAT` (fine‑grained/classic PAT with Projects read/write + Repo read) and change `github-token:` inputs accordingly.

**Security.** No webhooks or callback URL required; the App only grants Actions a short‑lived installation token. Keep the private key in Actions secrets.

**Troubleshooting.**

- 403 on project updates → the App likely lacks **Org → Projects: Read &amp; write**, or isn’t installed on the repo.
- Items not added to project → check `LS_PROJECT_URL` and that it’s a **Projects (Beta)** board, not Classic.
- Labels not applied → ensure `.github/labeler.yml` exists and patterns match the repo.

---

Setup Projects Automation
-------------------------

[](#setup-projects-automation)

Follow these steps once per organisation; then drop the workflows into any repo that should be automated.

### 1) Create &amp; install the GitHub App

[](#1-create--install-the-github-app)

1. Org **Settings → Developer settings → GitHub Apps → New GitHub App**.
2. Name it (e.g. *LightSpeed Projects Bot*). Webhooks/callback not needed.
3. **Permissions:** Org → Projects **Read &amp; write**. Repo → Issues **Read**, Pull requests **Read**, Contents **Read**.
4. **Generate private key** (download `.pem`).
5. **Install** the App to the org (all or selected repos).

### 2) Add Actions secrets &amp; variables

[](#2-add-actions-secrets--variables)

At the **org level** (recommended) or per repo:

- Variables: `LS_APP_ID`, `LS_PROJECT_URL`
- Secrets: `LS_APP_PRIVATE_KEY`

**CLI (example):**

```
gh variable set LS_APP_ID --org LightSpeed --body 123456
gh variable set LS_PROJECT_URL --org LightSpeed --body https://github.com/orgs/LightSpeed/projects/1
gh secret set LS_APP_PRIVATE_KEY --org LightSpeed
