Hi all,
we are trying to create a simple forge app that can check the commit message in the PR
before merge
i can not understend even where to start, not a lot of examples on how to use it and write the index.js or manifest.yml
tried using https://developer.atlassian.com/platform/forge/example-apps-bitbucket/#bitbucket-check-pull-request-title-app and fifnt succeeded
ill appricate any help :)
Hi @shani.feldboy ,
It sounds like you are looking to create a Custom Merge Check. The blog I linked gives you a high-level overview of how to get started such as onboarding your workspace and enabling checks for a repository.
We're aware our documentation on creating making a Custom Merge Check app is limited and are working on improving it. For now, I'll provide some additional instructions:
I hope this helps and feel free to ask any additional questions if you encounter any issues.
Hillary
I'm willing to bet that most people thinking about using this, are comparing and contrasting this against bitbucket pipelines.
I checked these docs out a couple weeks ago and what isn't made immediately clear is how to interact with the code the pull request pertains to.
Yes, we could use bitbucket API's, lookup the PR and get the code. But there is no example showing how to do this.
It would be good to have a sample and guide that shows how merge checks could interact with the code associated with the PR.
Alternatively, if this isn't what custom merge checks are meant to be used for yet, then it would be good to communicate that clearly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Garrett_LoVerde - this is a really excellent point and you are 100% correct. Something the team is working on right now is library of helper functions that is published as an NPM module that can be included in any Forge Apps being built.
These helper functions are designed to abstract away the complexity of common tasks exactly like the one you mentioned. Collecting the diff details of a PR is #1 on the list of tasks that we will be adding to this library.
This utility has not been added to the library yet - just to be clear, but it is something we have in our plan.
The package is available here: https://www.npmjs.com/package/@forge/bitbucket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From what is public it looks like a small step in the right direction.
What I really need is to be able to intellisense my way into calling the API's without having to go look up the REST API and copy paste URI's.
I write C code for microcontrollers; anything that can be done to reduce the cognitive load outside of the already formidable load posed by react and it's conventions will be helpful.
I fully understand that you'll need to draw the line somewhere regarding who you consider a target user but it feels odd not being able to make API calls without copy pasting a URI.
I've been looking into creating a Repository Main Menu Page that is dedicated to viewing and setting pipeline schedules (BB's schedule viewer is near unusable).
My JS/TS data structure/transformation skills are so rusty that transforming the API response into a form that can be dropped into a UI-Kit2 dynamic table feels almost insurmountable at the moment. (Not much you can do for me on that)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @shani.feldboy - just checking in, how did you go with this, were you able to get up and running?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
ive manged to use it thanks !
now im stuck on getting group members using API
im tring to run -
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @shani.feldboy ,
1.0 REST endpoints are not available on Forge.
You can only use endpoints on https://developer.atlassian.com/cloud/bitbucket/rest/intro/ that have been marked with "Forge app scopes required:".
The closest equivalent endpoints on are
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks but that's not what we needed
We check if a PR author is in a specific group
The process is -
1. Get the author PR via API call (works)
2. Get members in a specific group (doesn't work)
3. Check if #1 is a part of #2
Please advise
I tried using the links you sent but couldn't get a reply back
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @shani.feldboy ,
Unfortunately there are no equivalent endpoints related to group permissions on our 2.0 APIs. If you would like this endpoint ported to our 2.0 APIs, please raise a new issue on https://jira.atlassian.com/projects/BCLOUD/summary for this request to be triaged by the relevant team. The issue should be raised under the project "Bitbucket Cloud (BCLOUD)"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.