Pull request at GitHub results in Compare changes page - how to proceed? - github

I wanted to fix some typos in a Microsoft documentation repo. I clicked on its New pull request button. That resulted in the following page being displayed:
As you can see, the green Create pull request button is disabled. How do I proceed from here? In other repos (such as for Amazon documentation), the process works differently, and I am able to directly create a pull request.

The common scenario of making such PRs looks like the following:
fork the repository http://prntscr.com/m7yhq0
make a new branch there with name like fix/several-typos http://prntscr.com/m7ytis
change a file and commit your changes to the branch (there should not be any difficulties)
go to the original repository, click New pull request and choose compare across forks http://prntscr.com/m7yih0
select necessary branches for PR and then the button Create pull request will be enabled.
Review your changes displayed below and click Create pull request
Hope that will help.

Related

How to remove [WIP] work in progress tag from pull request on github?

I have made a pull request yesterday with the [WIP] tag and now my task is finished, I want the review so how will I remove that WIP tag from the Pull request to make that review ready from the organization repository on GitHub?
You need to click edit on the right of the PR when you open it, and then you can change the name, else the reviewer when merging into the main branch can change the name, and i suggest to use the git naming convention, to have a clean and organized history, using also gitmojis

Automate filter files on pull request

I have created a github repo and deployed a simple HTML, CSS and JS website on it.
I want to create a github bot to automatically filter the pull request on the following basis:
If only the JS file is changed then the pull request is valid else it is invalid
Is it really possible to do that?
Thanks a lot for your help 😊
You could use a GitHub Action for that.
For instance, banyan/auto-label applies label based on file type.
In your case, fork that repository, and make your own GitHub Action in order to reject the PR if you detect a file whose extension is not the one set in your action.
A rejection ("mergeability of PR") can involve status check policy.

I cannot remove a pull request on github

I have a pull request showing on Github and a button which says compare and pull request then when I click on it it says There isn't anything to compare, master and other-branch are identical. It also says there are no changed files.
If I click on pull requests in the header bar then I still get the same yellow box saying compare and pull request above the box with the actual pull requests in but within that box it says I have 0 open pull requests and 2 closed pull requests from a year ago.
How can I get rid of this?

How can I link an issue when am I filling out a pull request form on GitHub?

There is a manual https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue
and I cannot complete the 4th step because I cannot find "Linked issues".
just write #issue number in pull request description to link the isuue
you can also write fixes #issue number closes #issue number to automatically close an issue when your pull request is accepted and merged
if you are the owner of the repository you can link an issue by clicking the setting icon in the Linked Issues on the right sidebar but if you are an outside contributor then you cant use it to change or link any issue you can only see which issues are linked

I lost my changes on github without pull request

I worked on github
I changed some code
I did a ‘’’git push’’’ to master
I forgot to ask a pull request.
Then, I did a ‘’’git pull —rebase origin master’’’
and so on my branch now I don’t have anymore all my previous code but I could see my changes on github.com
I tried to push again
then I couldn’t see anymore my changes on the GitHub homepage.
The problem is that I need to find my previous code.
Can anyone help please ?