-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: decaporg/decap-cms
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: decap-cms@3.1.7
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: decaporg/decap-cms
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: decap-cms@3.1.8
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 3 commits
- 32 files changed
- 4 contributors
Commits on Apr 3, 2024
-
Fix: Set correct branch when it's not specified in the config (#5844)
* feat: add helper for fetching default branch from Github * feat: add method for setting default branch * fix: set default branch after user has authenticated successfully * fix: format code * feat: add unit test for getting default branch name * feat: add helpers for parsing API responses * feat(lib-util): add helper for constructing request headers * feat(lib-util): add helper for constructing full URL for API request * feat(lib-util): store base URLs for each backend * feat(lib-util): add type annotation for the request config This requestConfig object will be passed to a helper for making API request * feat(lib-util): add helper for handle API request error * feat(lib-util): add config for making api request * feat(lib-util): add api request generator * feat(lib-util): add helper for getting default branch name Include switch clause to construct API urls for different backends * feat(lib-util): export method for getting default branch name * feat(gh-backend): add a boolean property to check if branch is configured The property is needed so that we'll only set default branch when branch prop is missing in config * feat(gh-backend): set prop `branch` as `master` when it's missing in config This is needed so that this property won't be empty when authorization is revoked. * feat(gh-backend): set branch name when it's missing in config * feat(gitlab-backend): set branch when it's not in the config * feat(bitbucket-backend): set branch when it's not specified in config * feat(lib-util): allow token type to be undefined Reason: Requesting information from a public repo doesn't require token * fix: format codes * feat(github): removed setDefaultBranch function Reason: Default branch is already set when calling `authenticate` function * feat(github): remove function for getting default branch * fix (github): removed GithubRepo object because it was never used * fix (gitlab test): Repeat response for getting project info 2 times Reason: The endpoint for getting Gitlab project info is called twice. Need to specify the number of times to repeat the same response as 2, or Nock will throw an error. * fix(gitlab test): add property `default_branch` to project response REASON: Getting a single project through `/projects/:id` returns an object which contains `default_branch` property, among many other props. The mock response needs to convey that. * fix(gitlab test): reformat codes * feat(lib util api): change function name Change from `constructUrl` to `constructUrlWithParams` to indicate that the returned url may contain query string * feat(lib-util api): Change variable name for storing API roots Change from `rootApi` to `apiRoots` to indicate that the varible contains multiple values * feat(lib-util api): Add varialbe for storing endpoint constants * feat(lib-util api): Change the returned value for `getDefaultBranchName` Reason: There's no `null` value for default_branch * feat(api test): Import Nock module for mocking API requests * feat(api test): Add default values for mocking API Default values include: default branch name, mock tokens and mock repo slug * feat(api test): Add mock response to getting a single repo * feat(api test): Add function for itnercepting request to get single repo * feat(api test): Add test for gettingDefaultBranchName * feat(lib-util): reformat codes * feat(jest config): add moduleNameMapper for GitHub and BitBucket Required for the test that checks setDefaultBranchName is called in lib-util to work * feat(lib-util test): return some modules from backend core for testing * feat(lib-util test): add owner login value for Github's repo response The authenticate method of Github API wrapper extracts owner.login from repo resp * feat(lib-util test): change access level for Gitlab to 30 Reason: If access level is under 30, Gitlab package will throw error * feat(lib-util test): add mock response for getting a user The authenticate method of each backend requires this * feat(lib-util test): add default config for backend field * feat(lib-util test): rewrite function for mocking API * feat(lib-util test): rewrite function for mocking request for repo * test(lib-util): rewrite test for the function getDefaultBranchName * test(lib-util): add function for resolving backend * test(lib-util): import 'set' module from Lodash * test(lib-util): add helper for constructing url path for each backend * test(lib-util): add function for intercepting API request to authenticate * test(lib-util): import each backend module * test(lib-util): add tests that check each backend calls getDefaultBranchName * style: format files * fix: query branch name before setting Github API service * fix: reformat implementation module of Github backend * fix: remove importing of getDefaultBranchName from lib * fix: removed test for getDefaultBranchName in lib packages * fix: removed unused vars in api test for lib package * feat: retrieve default branch before creating Bitbucket AI instance * fix: reformat codes in Bitbucket implementation module * fix: add missing import --------- Co-authored-by: Erez Rokah <erezrokah@users.noreply.github.com> Co-authored-by: Martin Jagodic <jagodicmartin1@gmail.com> Co-authored-by: Anze Demsar <anze.demsar@p-m.si>
Configuration menu - View commit details
-
Copy full SHA for c91a70f - Browse repository at this point
Copy the full SHA c91a70fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 46294d6 - Browse repository at this point
Copy the full SHA 46294d6View commit details -
- decap-cms@3.1.8 - decap-cms-app@3.1.8 - decap-cms-backend-bitbucket@3.1.2 - decap-cms-backend-github@3.1.2 - decap-cms-backend-gitlab@3.1.3 - decap-cms-lib-util@3.0.4 - decap-cms-widget-datetime@3.1.3 - decap-server@3.0.4
Configuration menu - View commit details
-
Copy full SHA for d3678b0 - Browse repository at this point
Copy the full SHA d3678b0View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff decap-cms@3.1.7...decap-cms@3.1.8