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

Disable restricted comments in Jira #128

Open
zswanson opened this issue May 1, 2021 · 8 comments
Open

Disable restricted comments in Jira #128

zswanson opened this issue May 1, 2021 · 8 comments
Labels
enhancement New feature or request

Comments

@zswanson
Copy link

zswanson commented May 1, 2021

I'm getting the following error from reload/github-security-jira@v1.1.0 (latest release)
I am correctly setting the env var as described in the README but I'm observing the error even if I ommit the env var or if I specify any value for a valid group that the jira api token and user belongs to. The action is creating a ticket when it runs, it just fails on trying to add the restricted comment. I don't actually need or care about this comment, but I get the same output even if I remove the variable.

Run reload/github-security-jira@v1.1.0
  env:
    GH_SECURITY_TOKEN: ***
    JIRA_TOKEN: ***
    JIRA_HOST: https://JIRA_URL/
    JIRA_USER: JIRA_USERNAME
    JIRA_PROJECT: ABC
    JIRA_ISSUE_TYPE: Bug
    JIRA_RESTRICTED_COMMENT_ROLE: JIRA_ROLE

In JiraClient.php line 264:
                                                                               
  CURL HTTP Request Failed: Status Code : 400, URL:https://telemedicine.atlas  
  sian.net//rest/api/2/issue/VCB-3440/comment                                  
  Error Message : {"errorMessages":[],"errors":{"commentLevel":"You are curre  
  ntly not a member of the project role: Developers."}} 
@Anton-Shutik
Copy link

I fixed it with:
JIRA_RESTRICTED_COMMENT_ROLE: "*"

@matteobaldelli
Copy link

I fixed it with: JIRA_RESTRICTED_COMMENT_ROLE: "*"

it is not working for me 😞

Error Message : {"errorMessages":[],"errors":{"commentLevel":"Role with id:    * does not exist."}} 

@HarlemSquirrel
Copy link
Contributor

Could we have an option to not comment at all?

@arnested
Copy link
Member

Could we have an option to not comment at all?

Must be implemented in https://github.com/reload/jira-security-issue first.

@CRUZEAAKASH
Copy link

Can you please share any timeline when this can be implemented and fixed? I am also getting the same issue as @zswanson mentioned.

@xendk
Copy link
Member

xendk commented Apr 18, 2023

@CRUZEAAKASH Not really. It depends on it being enough of an itch for someone to make a PR implementing JIRA_NO_COMMENT option in https://github.com/reload/jira-security-issue .

@HarlemSquirrel
Copy link
Contributor

Basically it looks like we could put a condition around these lines based on a new environment variable.

https://github.com/reload/jira-security-issue/blob/50fb0512ea089cb4cc8b1f4272817b898697489e/src/JiraSecurityIssue.php#L248-L250

@xendk
Copy link
Member

xendk commented Apr 19, 2023

@HarlemSquirrel That's the gist of it. But the comment is also used to notify about watchers not being found, which is an error condition we'd rather like to notify somebody about.

The only viable alternative to using a comment for that is making the action fail on unfound watchers, but that might be a bit heavy handed @arnested ?

@kasperg kasperg changed the title JIRA_RESTRICTED_COMMENT_ROLE has no effect Disable restricted comments in Jira Sep 18, 2023
@kasperg kasperg added the enhancement New feature or request label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

8 participants