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

Change in the api call to fetch status using the commit ref instead o… #66

Closed
wants to merge 1 commit into from

Conversation

sumitsawant
Copy link

@sumitsawant sumitsawant commented Oct 4, 2020

…f master

Fixes #63

@sumitsawant
Copy link
Author

sumitsawant commented Oct 4, 2020

Changes in the api call to fetch status using the commit ref instead of master

@@ -51,16 +51,21 @@ export default class AddProject extends React.Component {
};
}
axios
.get(
.get(
`https://api.github.com/repos/${this.state.input}/commits/master/status`,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still making api calls using the master :ref instead of latest commit ref

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But then will user have to enter commit id as well as part of input

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is making call using master ref to fetch latest commit ref API URL from response and getting status from that only

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a nested axios call

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@haroon-sheikh haroon-sheikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it's still using the master instead of the latestcommit hash to fetch the status.

@haroon-sheikh
Copy link
Collaborator

@sumitsawant Are you still looking into this?

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

Successfully merging this pull request may close these issues.

Fix an issue with getting latest status of master
2 participants