🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms GitLab Issues Premium Add-on Setup Guide

Updated 11 min read Gravity Forms Integrations A–Z
On this page
  1. Video walkthrough
  2. What you need
  3. Make an access token in GitLab
  4. Personal access token
  5. Project access token
  6. Install and connect
  7. Self-hosted GitLab
  8. Create a feed
  9. What an issue looks like
  10. The result in WordPress
  11. When something goes wrong
  12. Security: what the add-on protects you from
  13. For developers
  14. Things worth knowing before you launch
  15. Frequently asked questions
  16. Does it work with gitlab.com and with a self-hosted GitLab?
  17. Which token should I use?
  18. Is the token safe in my database?
  19. Can one form create issues in different projects?
  20. Will a visitor see a link to the issue?
  21. What if GitLab is down when a form is sent?
  22. Which Gravity Forms versions does it support?
  23. Get started

Video walkthrough

Gravity Forms GitLab Issues Add-On Setup Guide: Token, Project and Feed (WordPress Side)
Video setup guide: Gravity Forms GitLab Issues Watch on YouTube

The Gravity Forms GitLab Issues Premium Add-on creates a GitLab issue from every Gravity Forms submission you choose. A visitor fills in a form on your WordPress site, and a few seconds later the team has an issue in the right GitLab project, with the answers in the description, the labels you want, an assignee if you like, and a link back to the entry. It works with gitlab.com and with a self-hosted GitLab, and it uses a personal access token or a project access token.

The add-on talks to the GitLab REST API version 4 and to nothing else. The token is stored encrypted in your database, a private or local network address is refused unless you allow it in code, and what visitors type cannot run GitLab commands or notify people.

What you need

  • WordPress 6.5 or newer and PHP 7.4 or newer.
  • Gravity Forms 2.9 or newer. The add-on is tested with Gravity Forms 3.1.2 on PHP 8.3 and Gravity Forms 2.9.8 on PHP 7.4.
  • A GitLab project where issues are turned on, on gitlab.com or on your own GitLab.
  • An access token for that project (explained in the next part).
  • An active license key for this add-on.

If Gravity Forms is missing or older than 2.9, the add-on shows a notice in the WordPress admin and does nothing else.

Make an access token in GitLab

The add-on needs a token that is allowed to create issues. GitLab calls the permission the api scope. Either kind of token works.

Personal access token

  1. In GitLab, open your avatar, then Edit profile, then Access tokens.
  2. Choose Add new token, give it a name such as the name of your website, set an expiry date, and tick the api scope.
  3. Copy the token at once. GitLab shows it only one time.

Issues are created in the name of the person who owns the token, so many teams make a separate user such as a form bot and give that user the Reporter role on the project.

Project access token

  1. Open the project, then Settings, then Access tokens.
  2. Choose Add new token, tick the api scope and choose the role Reporter or higher.
  3. Copy the token.

A project token is limited to one project and creates the issues in the name of a bot user, which is the tidiest choice when one form feeds one project. Project access tokens are available on every self-managed GitLab and on gitlab.com Premium and Ultimate.

Install and connect

  1. Install and activate the add-on like any plugin, after Gravity Forms.
  2. Open Forms → Settings → GitLab and enter your license key.
  3. In GitLab address keep https://gitlab.com, or type the address of your own GitLab, for example https://gitlab.yourcompany.com. Do not add /api/v4; if it is there, it is removed for you.
  4. Paste the token into Access token. The field is hidden, and the token is encrypted before it is saved.
  5. Optional: type a Default project, either the project number or the path such as my-group/my-project. A feed that leaves its project empty uses it.
  6. Press Save Settings, then Test connection.
The GitLab connection settings of the add-on: GitLab address, access token, default project and the Test connection button showing a green result
Forms, Settings, GitLab: the address, the token (never shown), the default project and the Test connection button.

Test connection asks GitLab for its version, or for the default project if you typed one, using what is typed on the screen. A green message means the address and the token work. A red message tells you what GitLab answered, for example HTTP 401 for a wrong or expired token, or HTTP 404 for a project that does not exist or that the token cannot see. The token is never part of a message.

Self-hosted GitLab

A self-hosted GitLab needs nothing special, with a few points to know.

  • Use https. The address must start with https:// because the token travels with every request. A plain http address is refused.
  • A port or a sub-path is fine. https://git.yourcompany.com:8443 and https://yourcompany.com/gitlab both work.
  • The certificate must be valid. Certificate checking is always on. If your GitLab uses a certificate from your own authority, add that authority to the web server of your WordPress site.
  • Redirects are not followed. The token must never be sent on to another host. If your address redirects, use the final address.
  • The address must be public. A GitLab that lives only on a private network (a 10.x or 192.168.x address, a .local or .internal name, localhost) is refused, so that a form can never be used to reach machines inside your network. If you run a GitLab on a private network on purpose, see the developer part below.

Create a feed

The add-on is a normal Gravity Forms feed add-on, so each form can have as many GitLab feeds as it needs. Open a form, go to Settings → GitLab and choose Add New.

The GitLab feed settings of a Gravity Forms form: project, issue title, description with all fields, entry link, confidential, type, labels, assignees and due date
The feed of a form: where the issue goes and what it contains, with merge tags in every text field.
  • Name: only for you, to tell feeds apart.
  • Project: the project number, the path (my-group/my-subgroup/my-project) or the address of the project copied from your browser. Merge tags work, so one form can send different topics to different projects. Leave it empty to use the default project of the settings.
  • Issue title: one line of up to 255 characters. Merge tags work, for example the subject field.
  • Description: GitLab Markdown. Type {all_fields} to get a list with every answer, or write your own text with merge tags, or both.
  • Entry link: adds the name of the form and a link to the entry in your WordPress admin at the end of the description.
  • Confidential: makes the issue visible only to project members. It is on for a new feed, because forms often hold personal data. Turn it off for a public roadmap or a public bug tracker.
  • Type: issue, incident, task or test case.
  • Labels: comma separated, merge tags work. A label that does not exist yet is created by GitLab.
  • Assignee user IDs: GitLab user numbers, comma separated. GitLab Free accepts one assignee; Premium and Ultimate accept several. With several numbers the first one is sent as the main assignee so that every GitLab edition does something sensible.
  • Milestone ID: the global number of a milestone.
  • Due date: a date as YYYY-MM-DD, or a merge tag of a date field. A value that is not a real date is left out instead of making the request fail.
  • Condition: use conditional logic to create the issue only for some submissions, for example when Priority is Urgent.

What an issue looks like

With the default description the issue holds a list such as this one, followed by a line with the form name and the entry link.

- **Name:** Tomas Rivera
- **Email:** tomas.rivera@yourcompany.com
- **Subject:** Invoice PDF is blank
- **Priority:** Normal
- **What happened?:** The PDF opens as a blank page.

---
Sent by the form "Report a problem", entry 535: https://yourcompany.com/wp-admin/...

Fields that are empty, that are hidden by conditional logic, or that cannot be shown as text (section titles, HTML blocks, passwords, card numbers) are left out. An uploaded file appears as its address.

The result in WordPress

Every submission leaves a note on the entry. On success the note holds the number of the issue and its address; on failure it holds what went wrong. The address of the issue is also saved as entry meta called GitLab issue, which you can show as a column in the entries list.

A Gravity Forms entry screen with the GitLab note: issue number 60 created, with the address of the issue
The entry screen: a note with the number and the address of the issue that was created.

The visitor sees nothing of this. The issue is made after the submission is saved, and a GitLab problem never stops the entry from being saved or changes the confirmation.

When something goes wrong

  • HTTP 401: the token is wrong, expired or revoked. Make a new one and save it.
  • HTTP 403: the token has no api scope, the role is too low, or issues are turned off in the project.
  • HTTP 404: the project path or number is wrong, or the token cannot see the project. Private projects answer 404 to a token that is not a member.
  • HTTP 400: GitLab refused a value, and the note says which one, for example a milestone that does not exist.
  • HTTP 429: too many issues too fast. GitLab limits how fast issues can be created; the entry keeps its note, and the issue can be made by hand from the entry when the limit is over.
  • HTTP 5xx or a timeout: GitLab or the network is having trouble. The entry keeps a note; make the issue by hand from the entry.
  • The GitLab address must start with https, private or local network, could not be found in DNS: the address in the settings needs a change, as the note explains.
  • No valid project: the project of the feed and the default project are both empty or malformed.

Gravity Forms runs each feed once for an entry, which also stops an issue from being made twice for the same submission. A failed feed is therefore not repeated by itself. Fix the cause (for example a new token), and the next submissions work again. For an entry that failed, create the issue by hand from the answers on the entry screen. A developer who wants to run feeds again can allow it with the Gravity Forms filter gform_allow_feed_reprocessing.

Security: what the add-on protects you from

  • The token is encrypted at rest with AES-256-GCM, using a key derived from the secret keys of your WordPress site. It is never printed on a page, in a note or in the log, and a GitLab message that repeats it is cleaned before it is shown. If you prefer, put define( ‘GEGI_TOKEN’, ‘your-token’ ); in wp-config.php and the token never touches the database; the settings screen then says so.
  • Visitor text cannot give GitLab commands. GitLab runs quick actions that start a line with a slash, such as closing an issue or assigning it. A line that a visitor types in that form gets an invisible space in front of the slash, so it stays plain text. The same is done to @mentions, so a visitor cannot notify a group or a person. Your own feed text is treated the same way unless you allow quick actions in code.
  • Merge tags typed by visitors are not expanded. If a visitor types a merge tag into a text field, it appears in the issue as typed.
  • No requests to private networks, and every address is checked again for each request, including every address a name resolves to.
  • The token goes only to your GitLab address, with no redirects, with certificate checking, and never to any other site.

For developers

A few filters and actions let you adjust the behavior without editing the add-on.

  • gegi_allow_private_hosts (filter, receives false and the host name): return true for a GitLab inside your own network. Return true only for the host you mean.
  • gegi_allow_insecure_http (filter): return true to accept an http address, for a trusted internal network only.
  • gegi_allow_quick_actions (filter, receives false, the feed and the form): return true if the text of your feed should keep quick actions and mentions as typed.
  • gegi_issue_input (filter): change the title, description, labels, assignees, milestone, due date or type just before the request is made.
  • gegi_http_args and gegi_timeout (filters): change the request settings, for example the time limit of 20 seconds.
  • gegi_issue_created and gegi_issue_failed (actions): run your own code with the result, the entry, the feed and the form.

Things worth knowing before you launch

  • Without an active license nothing is sent to GitLab.
  • A submission creates exactly one issue per feed. A form with two feeds creates two issues.
  • Files are not uploaded to GitLab. The issue holds the address of each uploaded file, so keep the files on your site reachable by the people who will open the issue.
  • Labels, assignees and milestones are not looked up first. If GitLab does not know a milestone number, it answers with an error that you can read in the entry note.
  • The add-on only creates issues. It does not read, close or update them.

Frequently asked questions

Does it work with gitlab.com and with a self-hosted GitLab?

Yes. The address in the settings is https://gitlab.com by default; type the address of your own GitLab to use that instead. Both use the same REST API.

Which token should I use?

A project access token with the api scope and the Reporter role is the tidiest, because it is limited to one project. A personal access token with the api scope is the choice when one token has to serve several projects.

Is the token safe in my database?

It is stored encrypted and never shown again. For the highest level, set it with GEGI_TOKEN in wp-config.php so that it is not in the database at all.

Can one form create issues in different projects?

Yes. Use one feed per project with conditional logic, or one feed with a merge tag in the Project field.

No. The issue address is saved on the entry for your team. If you want to show it, the entry meta can be used in your own code.

What if GitLab is down when a form is sent?

The entry is saved, and the note on the entry says what failed. The issue for that one entry can be made by hand; the next submissions work again as soon as GitLab is back.

Which Gravity Forms versions does it support?

Gravity Forms 2.9 and newer. It is tested with Gravity Forms 3.1.2 on PHP 8.3 and Gravity Forms 2.9.8 on PHP 7.4.

Get started

The Gravity Forms GitLab Issues Premium Add-on turns a Gravity Forms submission into a GitLab issue, on gitlab.com or on your own server, with a token that stays encrypted. See the features, the price and more on the add-on page.

See the GitLab Issues add-on

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr