Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix magic8.py error #552

Open
GarikGelios opened this issue Nov 12, 2022 · 12 comments
Open

Fix magic8.py error #552

GarikGelios opened this issue Nov 12, 2022 · 12 comments

Comments

@GarikGelios
Copy link

The code for magic8.py uses the Python random library without importing it. This causes issues during runtime.

@GarikGelios
Copy link
Author

Hi,

I see not everyone managed to link the issue and the pull request.
In the pull request, I indicated the ID of my issue, as stated in the task and indicated in the example.
image

The number added in the title remained plain text and did not create any connection.
image

In the issue itself, you can see that there is nothing in, except my comment. I saw some users have such a link, but I don't understand why some have it and some don't.

@sabajamalian Can you help resolve this issue?

@GarikGelios
Copy link
Author

@elmanorc @benchan79 @JohnPCode @mike201245 @ManonWestra
Hi,
You are 5 out of 25 on the one issue page who have a link between the issue and the pull request.

Can you please help?
How did you manage to create a link between the issue and the pull request? Did you use only the command line, as described in the course?

@elmanorc
Copy link

Hi, just use #123 where 123 is the issue number and GitHub will automatically create a link between the PR and the issue.

You can either use the command line or create the PR directly on GitHub.

@GarikGelios
Copy link
Author

GarikGelios commented Nov 12, 2022

Hi, just use #123 where 123 is the issue number and GitHub will automatically create a link between the PR and the issue.

You can either use the command line or create the PR directly on GitHub.

Thanks for taking the time to reply.

As you can see in the screenshot in my comment , I indicated the issue number in the message when creating the Pull Request on the command line. It didn't work.

What do you mean by "use"? Where else should I put the issue number to link to this request?

Kind regards!

@GarikGelios
Copy link
Author

In the Pull Request, I mentioned this issue in a comment and a link appeared in the issue,
image
but this is not exactly the process that was described in the lesson.

@sabajamalian
Copy link
Collaborator

Hey @GarikGelios, it appears that you have tried to put the issue number in the "Title" of the pull request, while GitHub only is able to parse issue numbers in the "Body" of a Pull Request. The "Body" describes the details of the PR which appears to be empty in your PR. Could you try putting the issue number in the "Body" and see if that works?

@GarikGelios
Copy link
Author

Hey @GarikGelios, it appears that you have tried to put the issue number in the "Title" of the pull request, while GitHub only is able to parse issue numbers in the "Body" of a Pull Request. The "Body" describes the details of the PR which appears to be empty in your PR. Could you try putting the issue number in the "Body" and see if that works?

Hi,
Thanks for the advice!

I tried it on my test repository and it worked, almost perfect.
image
But the icon did not appear in the list of problems that there is a linked pull request
image
In the course repository, I see this icon and it's interesting
image

The tutorial says add to "description" but the command line uses the terms "title" and "body". Moreover, when writing to the "body", you must press (e), a notepad will open, you must enter the text there and save - investigating the issues in the lesson repo, this was not obvious to most.

Thanks!

@sabajamalian
Copy link
Collaborator

Understood the confusion around the 'body' vs. 'description' terminologies. Thanks for bringing this up! I'll work with the team to have the lesson text reflect this difference between the CLI and UI.

Regarding the lack of icon on your personal repository, could you make your personal repository public so I can review? Thanks!

@GarikGelios
Copy link
Author

Regarding the lack of icon on your personal repository, could you make your personal repository public so I can review? Thanks!

Of course, here is a link to my only closed issue in repository.

If you look at the issues in the current repository, you will also notice that only a few of them have an issue link icon with the pull request.

@sabajamalian
Copy link
Collaborator

Great, thanks @GarikGelios!

I believe I figured out what is going on.
There is a difference between "linking" an issue with a PR and "mentioning" an issue in a PR. By using the # sign in the description (if through UI) or body (if through API) of a PR, you can mention a pull request in your PR, providing a clickable link to the issue from the PR. For example: GarikGelios/CV#12

You can, however, link a PR to an issue by following the instructions at this document.

Now what makes GitHub so interesting is that if you use one of the pre-defined keywords listed at this document while mentioning an issue in the description/body of your PR, GitHub is smart enough to link them for you automatically! For example: https://github.com/GarikGelios/CV/pulls

Therefore, the PRs you see in the list that have the cool link to the issue happen to use one of the keywords in their descriptions.

This cool feature of GitHub was new to me! Thanks for bringing his up! I'll work with the team to update the lesson instructions in the next versions.

@ericsonrd
Copy link

ericsonrd commented Nov 16, 2022

Regarding the lack of icon on your personal repository, could you make your personal repository public so I can review? Thanks!

Of course, here is a link to my only closed issue in repository.

If you look at the issues in the current repository, you will also notice that only a few of them have an issue link icon with the pull request.

Hi @GarikGelios I was looking into this thread because I wondered the same about linking the Issue with the Pull Request.

For some reason the first comment doesn't include the description, so what I did was to edit this first comment and added the description manually with the Issue Number (#).

Once I added the Issue Number, an option popped up with the Issue Link Icon meaning it would link the issue with the PR.

Hope it helps!

@sabajamalian
Copy link
Collaborator

Safe to close the issue @GarikGelios ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants