I got a coding challenge from a company and they require to complete a project on https://www.hatchways.io/
I already completed all of the code, but as I submit it shows that
{ Before you submit the Front-end Work Simulation - Hatchways Times project, you will need to pass the following pre-checks:
You must have an open pull request. ❌
You do not have multiple pull requests opened. ✅
Sorry, looks like you didn't pass all the pre-checks above. Please make sure you satisfy all the requirements before you retry. }
I have two branches one is 'main' another one is 'practice'. I already checked I don't have any pull request both of branches.
Is there anyone know how to solve it please?
Pull Request
record of pull request
Click New pull request
Set the branch to practice and the base branch to main
Submit
Related
The Azure DevOps Board works with pull requests. The stories are always automatically set to the status "Closed" at the PR, as desired. The problem now is that the status of the work item bug is set to "Resolved" instead of "Closed" after the PR, which means that the item is no longer visible on the board.
I have tried to correct a setting in the PR, as well as in the process settings of the board, however I can't find a suitable place how this can be solved.
If the item bug is moved manually on the board, it has the status "closed" as expected.
Settings: We use a copy of the "Agile" process for the project.
Question: How do I configure the project/board so that a bug that is closed by the PR has the status "Closed" instead of "resolved"?
How do I configure the project/board so that a bug that is closed by the PR has the status "Closed" instead of "resolved"?
I am afraid that there is no out-of-box method can custom the work item state when completing the Pull Request.
For a workaround, you can disable the option: Complete associated work items after merging when completing Pull Request.
Then you can modify the Pull Request description with the following format: Closed: #workitemid
For example:
Then when you complete the pull request, the work item state will change to closed.
For more detailed info, you can refer to this doc: Set work item state in pull request
I can fully understand your requirement. Here is an existing Suggestion ticket about the feature request: Ability to configure target work item state after completing PR
My requirement is to tell the user if his/her PR got deployed successfully or not
So I thought,
I can ask user about his PR#
Using PR# - Fetch Build Details
Using BuildID from Step 2, find deployment information
I stuck at step 2
I am using below documentation to fetch build details.
https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/list?view=azure-devops-rest-6.0
Not able to find correct usage of reasonFilter parameter to pass pull request id to fetch build details
API URL Info
Build Reson
Can someone help how exactly to use reasonFilter parameter here
tried this _apis/build/builds?api-version=5.1&$top=1&reasonFilter=pullrequest=20056
Regarding the point you're stuck with: The reasonFilter is simply a number of predefined string values you can choose from. For instance, if you specify reasonFilter=pullrequest, you get all builds started by a pull request. Thus, you can't specify the exact PR ID here.
Regarding your requirement in general: I don't think there's an API to strictly tie the PR ID and its build(s). You should look into the Status API instead. The build is just one of the statuses that can be associated with the pull request or, more specifically, with the commit.
So, I would approach your task the following way (note that it's not an exact algorithm, but a number of steps I would try to find the solution):
get the pull request by the PR ID provided by user
find the lastMergeCommit in the response
get the statuses of that merge commit
investigate the collection of GitStatus objects returned back and find out how to filter the build you're looking for (I don't know the format of that response for sure, but I'm confident there's some attribute to judge by)
Hope this can lead you to the right direction.
how exactly to use reasonFilter parameter here tried this _apis/build/builds?api-version=5.1&$top=1&reasonFilter=pullrequest=20056
Based on your requirement, you need to filter the build via build reason and Pull Request ID.
I'm afraid there is no out-of-box parameter to filter by pull request ID in the Rest API.
For a workaround, you can try to add the tag to your build.
Here are the steps:
You can add a step in your build to use Pull Request ID as Build tag. Refer to this doc: AddBuildTag: Add a tag to the build
For example:
- powershell: |
Write-Host "##vso[build.addbuildtag]$env:SYSTEM_PULLREQUEST_PULLREQUESTID"
displayName: 'PowerShell Script'
condition: eq(variables['Build.reason'], 'pullrequest')
You can set the condition to make sure that when the pipeline is triggered by pull request, it will add build tag.
You can add the tagFilters in Rest API to filter the related build.
For example:
Get https://dev.azure.com/org/project/_apis/build/builds?reasonFilter=pullrequest&tagFilters=PullrequestID&api-version=6.0
Is there a way to trigger an automatic, custom tagging of a repository every time a pull request is merged in github ? for example...
After merging "pull request 8", id like to automatically tag the repository at that state as "$Major_Version.$pr_id".
The result might be "0.1.8".
Is this possible?
Worst case, if someone hasn't written a thing to do that yet, is to use the post-receive webhooks https://help.github.com/articles/post-receive-hooks
You'd need an internet-visible web server to do this, and some code to recognize the merge (it will have two parents) and see if it mentions a pull-request.
I have set up a web hook on Bitbucket to POST to my webserver to log some details. There is two webhooks on the repo, my custom one, and one for FTPloy.com. I have been pushing random commits to test the POST on my server etc, but after a while it stopped.
Never FTPloy.com or my own webserver receives a post request from Bitbucket after I pushed.
How is this possible/how can I fix it?
I had a hard time testing my web hook as well. I figured out that the best way to test is via command line. I copied the sample data shown here, added payload= to the beginning and saved it to a file: bb.post
Then via command line I submitted a POST request to my web hook using that file as the POST data: curl --data #bb.post http://mydomain.com/customWebHook.php
This is the best way I found to debug it.
Note: They never mention that when the last commit was from a merge, the "branch" attribute from that commit is null. Instead you need to look at "branches" attribute which is an array of the two branches that created the merge.
I always get "500 error " whenever I try to create a pull request on my fork in github, I just keep on trying it, at some point the page loads(it is . Is there any update or something that I have to do.?
My fork is uptodate with the branch I forked from. No clue how to fix it.
I was having the same issue -- going to https://github.com/[your account]/[repository]/pull/new and creating a PR from that page worked for me.
I guess the url for 500 error was like https://github.com/[your account]/[repository]/pull/new/[branch].
You can avoid 500 error by accessing via a URL like https://github.com/[your account]/[repository]/pull/new, then you can choose a branch to send pull request from and to.