feat(gl-set-slack): configure the GitLab for Slack app (per-event channels)
Closes #7 (closed) (follow-up to #6 (closed)).
What
Adds a GitLab for Slack app mode to gl-set-slack, alongside the existing legacy webhook service.
- New target
gl-set-slack-app(novault-loginprereq — the app needs no webhook/Vault) →PUT projects/:id/integrations/gitlab-slack-application. - New
slack_app_json()payload: per-event channels (issue_channel,note_channel,merge_request_channel,push_channel,tag_push_channel,pipeline_channel,deployment_channel,job_channel,wiki_page_channel, confidential variants), each defaulting toSLACK_GITLAB_CHANNELand CI/CD events (pipeline/job) toSLACK_CICD_CHANNEL. Channel vars are bare names; the script adds the#(matchingSLACK_GITLAB_CHANNEL). - Omits
work_item_channel(silently ignored by the current GitLab — per the issue caveat). - Reports which integration was modified; errors out (exit 1) with the API message on failure.
- The script still honors
SLACK_APP=truewhen invoked directly;gl-set-slack(legacy) is unchanged and its #6 (closed) warning now points atgl-set-slack-app.
Why
#6 (closed) only added a warning for Slack-app repos; #7 (closed) makes the app actually configurable from OTICA.
Testing
bash -n+make validatepass.- App JSON renders as valid JSON with
#-prefixed per-event channels, nowebhook, nowork_item_channel; pipeline/job route to the CI/CD channel. - End-to-end against a live Slack-app repo not exercised (no such repo available — noted in the issue); the API path/fields follow the documented
gitlab-slack-applicationintegration.
Self-reviewed (3 rounds): channel #-convention documented, vault-free target added so app mode needs no Vault.
Closes #7 (closed)