Is there any solution out of the box gitlab offers regarding sending emails for default approvers!
In other terms: if I am a default approver for a project X, then I want to receive an email whenever a new merge request is open in this project !
This is doable in bitbucket, not sure if it is the case also with gitlab.
Any help would be appreciated.
There isn't a global setting for
sending emails for default approvers
However, you can make use of Custom Notifications. They can be set at a project or a group level by the approvers themselves.
For example, you can click the bell icon in a given project and select Custom. By default Failed pipeline, Fixed pipeline, and Moved project are enabled in Custom notification events. You can then enable notification on New merge request as well.
Related
Hey I have Gitlab CE version and I would like to implement a job that verifies approvals from a peer. I know this feature is totally available for premium and ultimate versions. However, I already created a little hack that verifies that the person who approves the MR is different from the one who created it.
My question is: is there a way to cancel the approval, without being manually, if there has been a change to the code?
is there a way to cancel the approval, without being manually, if there has been a change to the code?
This is already the default behavior in GitLab. When new commits are pushed the source branch of an MR, all approvals are removed.
However, if that setting is not available in GitLab Free, there is no workaround for this as only the approver can revoke their own approval. You might be able to make a pipeline job remove the approval using the API, if you have a personal access token for every approver available in the job, but this is quite impractical.
We have a CI/CD setup in Azure DevOps that gets triggered from push on master branch. Is it possible to make the approver the user that was the cause of the build trigger?
The idea behind this is that we have many developers in our team so I want the specific dev that pushed changes make the decision on whether or not they want the changes deployed, vs. a dedicated approver.
Short answer, no.
Context:
This is the opposite of a good practice, which is why there's an option to require someone else to be the approver, but not the person who made the change. You don't want the person who made a change to be the one to approve it, because that enables a single person to sneak a change through. This means that mistakes can slip through, or even intentionally malicious changes.
The best practice is to require someone other than the person who made a change to review and approve the change.
While I totally agree with #Daniel Mann on why this shouldn't be done, the way I've seen it happen is that the Team is assigned as the recipient of the approval request, and the user requesting a release or deployment should not approve it checkbox remains unchecked.
Then to avoid the inbox noise of the approval request, turn off the notification for the team about pending release approvals.
EDIT
If you must have only that one person assigned as the valid user to approve changes for deployment, you could do this too, but it wouldn't be pretty. You could have a "stage" per person. These stages would use artifact filters in the pre-deploy conditions to only send approval email to the person that stage is for.
After the approval it forwards to the actual deployment stage to do the work.
Now you need to add the username or something as the tag on the build. I'm unsure if there's a tool/task to do this as part of the build pipeline to keep it continuous, but I know you could figure out how to do it from the REST api. Perhaps you would need to create a pre-approval stage that runs a PS script to access the REST api and tag the provided build with the value of requestedBy property on the build.
Again, see how hard it is to do this? That probably means you're not following best practices. "Make the right things easy and the wrong things hard." -Unknown
I got to know GitLab has a feature called, Default approvers.
And I found many conversations going around this topic in the GitLab EE issue tracking.
Some have suggested to keep a .yaml file to keep the Default approvers list, And someone told that readme.md is the file.
And also found a feature request which is still in the backlog:
Default Approvers for a merge request depend on what team a user is in
But I would appreciate if someone can tell what is the latest feature (let's say in v10.3.X) with GitLab to keep list of Default Approvers ?
The only closed recent issue I can find related to approval assignment is 1593, which is closed by MR 1892:
Selecting individual approvers
GitLab restricts the users that can be selected to be individual approvers. Only these can be selected and appear in the search box:
- Members of the current project
- Members of the parent group of the current project
- Members of a group that have access to the current project via a share
Those are the default members available to be selected as approvers.
There isn't yet a custom default list implemented.
I spent a lot of time to find out a really working solution for this problem. I read all the documents, blogs, forums and etc about this, but nothing worked. Let's go straightly to the question.
I'm using BitNami Redmine Stack, and I wanted to prepare a totally free helpdesk on redmine. As you know, redmine can originally create issue by email (in my case Gmail). Someone (let's say a customer) sends an email to redmine stack and declares an issue that need to be fixed by the support team. Then support team could see all the issues reported by customers and begin the fixing workflow. This way the customer will be informed about the updates for tissue and how the process is going forward
I used this article originally to solve the problem, but I changed some parts as needed. Here are the steps:
1. Create the Customer role and set the permissions
Sign in to Redmine as Administrator and go to the Administration > Roles and permissions > New role. Name it Customer, uncheck "Issues can be assigned to this role" and for Issue visibility select "Issues created by or assigned to the user".
Now in permission section, check the Issue tracking > Add Issue.
2. Create Redmine User for issues creation
Go to Administration > Users > New user and create an account, use the email of the customer here. Then go back to "Users", choose the user, go to Projects tab. In the "New project" panel, select the project, check the Customer role and click add.
3. You need a Gmail account for Redmine
Customers will send their mails to this Gmail address (let's call it redmine.YourCompanyName#gmail.com). Then we fetch mails and create issues in Redmine. So, go to Gmail settings and enable IMAP (cause we use IMAP)
4. Get the CACert.pem
Get the cacert.pem file from here and put it somewhere inside Redmine installation folder (I put it inside "C:\BitNami\redmine-2.3.1-1\apps\redmine\htdocs\cert.pem").
5. Now the script to fetch mails and create issues
Go to the directory that Redmine is installed. Then go to apps > redmine > htdocs (mine is "C:\BitNami\redmine-2.3.1-1\apps\redmine\htdocs\"), hold Shift key, right click and select "Open command window here". Now run this script in command window:
rake redmine:email:receive_imap unknown_user=accept no_permission_check=1 RAILS_ENV="production" host=imap.gmail.com port=993 username=redmine.YourCompanyName#gmail.com password=YourGmailPassword ssl=1 project=YourProject
set SSL_CERT_FILE=C:\BitNami\redmine-2.3.1-1\apps\redmine\htdocs\cert.pem
This script fetches mails in your Gmail account (redmine.YourCompanyName#gmail.com) and creates issues in Redmine. You may run this script periodically, so you could do it manually or create a job for it (i.e. a task in Task Scheduler)
I am new this sharepoint development and i have task in hand to do the following.
1.When a new document added to the library, the system will prompt for approvers & audience from a database table. this will be stored for future revisions for the document.
2. Upon successful completion of assigning approvers, audience the system will initiate the workflow to complete the approval process.
It would be great if anyone can point the direction to do the following:
1.is it possible to call a aspx page/form from document library insert/update event?
2.How to assign approvers to a workflow programmatically?
Thanks in Advance!
Alex
I'm not sure it is possible to explicitly call another page but you can use the "Source" url parameter to specify the page they are directed to after they press OK. Obviously, you will have to change "www.google.com" to be your new URL.
/Lists/Announcements/NewForm.aspx?Source=www.google.com
You can probably do all of this using custom workflow. With custom workflow you have two options: creating the entire workflow in visual studio or create custom workflow actions and using SharePoint Designer to build the workflow.
Building custom Workflow Actions.