2

I have a web app that is built in Gatsby and Netlify CMS with Bitbucket. Been looking for a way to implement editorial workflow in Netlify CMS. But seems that I cant make it work. Here's my code in my config.yml

backend:
  name: bitbucket
  repo: sample/repo
  branch: master
  auth_type: implicit
  commit_messages:
    create: 'Create {{collection}} “{{slug}}”'
    update: 'Update {{collection}} “{{slug}}”'
    delete: 'Delete {{collection}} “{{slug}}”'
    uploadMedia: '[skip ci] Upload “{{path}}”'
    deleteMedia: '[skip ci] Delete “{{path}}”'

local_backend: true
publish_mode: editorial_workflow
media_folder: static/img
public_folder: /img

I've hit a roadblock , I'm new to this kind of setup and researching about this in days. Any help would be deeply appreciated. Thank you so much and God bless!

Chadric Gotis
  • 117
  • 1
  • 13

1 Answers1

2

As you can see in Netlify's docs, the use in Bitbucket is still in beta, only available in version up to 2.10.6 (netlify-cms) or 2.11.3 (netlify-cms-app):

publish_mode: editorial_workflow

In order to track unpublished entries statuses the GitLab implementation uses merge requests labels and the BitBucket implementation uses pull requests comments.

In addition, when dealing with Bitbucket, you need to add the app_id in the config.yml (among the rest of configurations):

backend:
 name: bitbucket
 repo: owner-name/repo-name
 branch: default
 auth_type: implicit
 app_id: # The Key from your Bitbucket settings
 publish_mode: editorial_workflow

If your versions are up to date and the configuration properly set, you will see at the top of the screen the editorial workflow tab:

Editorial workflow in Netlify

The full workflow:

enter image description here

Keep in mind that the editorial workflow will only work in certain types of collections.

Ferran Buireu
  • 28,630
  • 6
  • 39
  • 67
  • Follow up question sir. I have netlify-cms-app version 2.12.14. Does it need to be exactly those two version only? Thank you! – Chadric Gotis Feb 09 '21 at 07:01
  • No, at least those versions but if you have a greater version it's also ok. These are the minimum required version. – Ferran Buireu Feb 09 '21 at 07:06
  • Still it wont work. :( I've added the app_id and my netlify-cms-app version is greater. – Chadric Gotis Feb 09 '21 at 07:08
  • `backend: name: bitbucket repo: sample/repo branch: master auth_type: implicit app_id: WWj4jwZ9DpHZUmRndE commit_messages: create: 'Create {{collection}} “{{slug}}”' update: 'Update {{collection}} “{{slug}}”' delete: 'Delete {{collection}} “{{slug}}”' uploadMedia: '[skip ci] Upload “{{path}}”' deleteMedia: '[skip ci] Delete “{{path}}”' # when using the default proxy server port local_backend: true publish_mode: editorial_workflow media_folder: static/img public_folder: /img` – Chadric Gotis Feb 09 '21 at 07:09
  • "netlify-cli": "^3.4.7", "netlify-cms-app": "2.12.14", "netlify-cms-media-library-cloudinary": "^1.3.2", "netlify-cms-media-library-uploadcare": "^0.5.2", "netlify-cms-proxy-server": "^1.3.1", "netlify-cms-yoast-seo": "^1.0.5", – Chadric Gotis Feb 09 '21 at 07:10
  • What's the issue? – Ferran Buireu Feb 09 '21 at 08:20
  • Still the editorial workflow menu wont show. :( – Chadric Gotis Feb 09 '21 at 08:32
  • Even if you create a post? – Ferran Buireu Feb 09 '21 at 10:05
  • 1
    It wont work on a local server but when I tried to make changes to the live version it worked like a charm! Thank you so much! – Chadric Gotis Feb 09 '21 at 23:19