This module contains a dynamic set of properties based on the current page.
Relevant model data from the page will be exposed here for your use.
Web Resource: com.atlassian.bitbucket.server.bitbucket-web-api:state
- Source:
Methods
-
<static> getCommit() → {JSON.CommitJSON}
-
Available on pages that show a commit (currently just /projects/PROJ/repos/REPO/commits/HASH).
Returns information about the commit.- Source:
Returns:
An object describing the current commit, if there is one.
- Type
- JSON.CommitJSON
-
<static> getCommitRange() → {JSON.CommitRangeJSON}
-
Available on pages that show a commit range (currently just /projects/PROJ/repos/REPO/commits/FROM-HASH?since=SINCE-HASH).
Returns information about the commit.- Source:
Returns:
An object describing the current commit range, if there is one.
- Type
- JSON.CommitRangeJSON
-
<static> getCurrentUser() → {JSON.StashUserJSON}
-
Available on every page. Returns information about the current user, if there is a logged in user.
- Source:
Returns:
An object describing the current user, if they are logged in.
- Type
- JSON.StashUserJSON
-
<static> getFilePath() → {JSON.PathJSON}
-
Available on pages that show a file (Pull Request, Commit, File Browser).
Returns path information about the currently viewed file.- Source:
Returns:
An object describing the current file, if there is one.
- Type
- JSON.PathJSON
-
<static> getProject() → {JSON.ProjectJSON}
-
Available on every page. Returns information about the currently viewed project, if there is one being viewed.
- Source:
Returns:
An object describing the current project, if there is one.
- Type
- JSON.ProjectJSON
-
<static> getPullRequest() → {JSON.PullRequestJSON}
-
Available on every page. Returns information about the currently viewed pull request, if there is one being viewed.
- Source:
Returns:
An object describing the current pull request, if there is one.
- Type
- JSON.PullRequestJSON
-
<static> getRef() → {JSON.RefJSON}
-
Available on every page. Returns information about the currently viewed ref (e.g. currently selected branch), if there is one being viewed.
- Source:
Returns:
An object describing the current ref, if there is one.
- Type
- JSON.RefJSON
-
<static> getRepository() → {JSON.RepositoryJSON}
-
Available on every page. Returns information about the currently viewed repository, if there is one being viewed.
- Source:
Returns:
An object describing the current repository, if there is one.
- Type
- JSON.RepositoryJSON
-
<static> getSourceBranch() → {JSON.RefJSON}
-
Available on Compare and Create Pull Request pages. Returns information about the branch where changes will come from, if there is one selected.
- Source:
Returns:
An object describing the branch where changes will come from, if there is one.
- Type
- JSON.RefJSON
-
<static> getSourceRepository() → {JSON.RepositoryJSON}
-
Available on Compare and Create Pull Request pages. Returns information about the repository where changes will come from, if there is one.
- Source:
Returns:
An object describing the repository where changes will come from, if there is one selected.
- Type
- JSON.RepositoryJSON
-
<static> getTargetBranch() → {JSON.RefJSON}
-
Available on Compare and Create Pull Request pages. Returns information about the branch where changes will be merged, if there is one selected.
- Source:
Returns:
An object describing the branch where changes will be merged, if there is one selected.
- Type
- JSON.RefJSON