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

doc: Remove --api-token from unsupported configurations #51

Merged
merged 1 commit into from
Apr 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ To use the GitHub Action with Codacy integration:
The Codacy GitHub Action is a wrapper for running the [Codacy Analysis CLI](https://github.com/codacy/codacy-analysis-cli) and supports [the same parameters as the command `analyze`](https://github.com/codacy/codacy-analysis-cli#commands-and-configuration), with the following exceptions:

- `--commit-uuid` (the action always analyzes the commit that triggered it)
- `--api-token`, `--username`, and `--project` (use [`--project-token`](https://github.com/codacy/codacy-analysis-cli#project-token) instead)
- `--username` and `--project` (the action automatically uses the owner and name of the repository when you specify the parameter `api-token`)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rtfpessoa looking at https://github.com/codacy/codacy-analysis-cli-action/blob/master/action.yml#L89 and https://github.com/codacy/codacy-analysis-cli-action/blob/master/action.yml#L239 I understood that the GitHub Action uses the owner of the repository (or organization name) as the --username. But on Codacy, the account API tokens are defined at the user level. What if these names don't match? Should we be more specific in the instructions above and require the owner to create the account API token? 🤔

Copy link
Contributor

@mrfyda mrfyda Apr 21, 2021

Choose a reason for hiding this comment

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

the --username flag represents the organization name on Codacy, which with sync organizations has the same name as the organization on GitHub - that's with the actions are assuming the value

any user that has access to the organization on Codacy will be able to interact with it using an account API token. the organization name and user don't need to match, just have access

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is quite interesting. Thanks for the context! 👍


## Contributing

Expand Down