Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-07-09 00:09:58 +00:00
parent 4bf6e14129
commit 5a8e0350c7
4 changed files with 15 additions and 3 deletions

View File

@ -101,6 +101,10 @@ export default {
}
} catch (error) {
createFlash({ message: error });
} finally {
if (this.jobTokenScopeEnabled) {
this.getProjects();
}
}
},
async addProject() {

View File

@ -3,6 +3,8 @@
module Mutations
module Issues
class SetConfidential < Base
include Mutations::SpamProtection
graphql_name 'IssueSetConfidential'
argument :confidential,
@ -19,6 +21,7 @@ module Mutations
::Issues::UpdateService.new(project: project, current_user: current_user, params: { confidential: confidential }, spam_params: spam_params)
.execute(issue)
check_spam_action_response!(issue)
{
issue: issue,

View File

@ -29,11 +29,11 @@ For examples of how you can use a project access token to authenticate with the
1. Navigate to the project you would like to create an access token for.
1. In the **Settings** menu choose **Access Tokens**.
1. Choose a name and optional expiry date for the token.
1. Choose the access level the token should have in the project.
1. Choose a role for the token.
1. Choose the [desired scopes](#limiting-scopes-of-a-project-access-token).
1. Click the **Create project access token** button.
1. Save the project access token somewhere safe. Once you leave or refresh
the page, you won't be able to access it again.
the page, you don't have access to it again.
## Project bot users

View File

@ -108,7 +108,7 @@ describe('TokenAccess component', () => {
expect(findTokenSection().exists()).toBe(false);
});
it('switching the toggle calls the mutation', async () => {
it('switching the toggle calls the mutation and fetches the projects again', async () => {
createComponent([
[getCIJobTokenScopeQuery, disabledJobTokenScopeHandler],
[updateCIJobTokenScopeMutation, updateJobTokenScopeHandler],
@ -117,11 +117,16 @@ describe('TokenAccess component', () => {
await waitForPromises();
expect(getProjectsWithScope).toHaveBeenCalledTimes(1);
findToggle().vm.$emit('change', true);
await waitForPromises();
expect(updateJobTokenScopeHandler).toHaveBeenCalledWith({
input: { fullPath: projectPath, jobTokenScopeEnabled: true },
});
expect(getProjectsWithScope).toHaveBeenCalledTimes(2);
});
});