vertica / spark-connector

This component acts as a bridge between Spark and Vertica, allowing the user to either retrieve data from Vertica for processing in Spark, or store processed data from Spark into Vertica.
Apache License 2.0
20 stars 22 forks source link

GitHub automation fails to move issues #487

Closed Aryex closed 2 years ago

Aryex commented 2 years ago

Descriptions

Our two github actions, auto-triage.yml and remove-issue.yml currently doesn't work due to the usage of GITHUB_TOKEN. We previously used a personal token, which would expire and overall not recommended. We have since moved to using GITHUB_TOKEN.

It seems however that it doesn't work, but the issue could be that the GITHUB_TOKEN does not have the necessary permissions.

About GITHUB_TOKEN

jeremyprime commented 2 years ago

The settings for the GITHUB_TOKEN are set to read/write, but it still does not work. According to GitHub Actions that should provide read/write access to the issues, among other resources.

Perhaps we can try explicitly setting the read/write permission for issues on the jobs:

jobs:
  <my-job>:
    permissions:
      issues: write 

Otherwise we may be forced to go back to using a personal access token (not ideal). In that case likely need a token with the repo and workflow scopes.

jeremyprime commented 2 years ago

Adding explicit permissions did not work. So we need to either go back to using a personal access token or find a different action that works with GITHUB_TOKEN.

Note for testing: After changes are made add a priority label (low. normal, or high) to an issue. This should cause the Move labelled issue action to run.

jeremyprime commented 2 years ago

Since GITHUB_TOKEN does not work, and we don't want to use our our Personal Access Tokens, the best approach would probably be to create a service account in GitHub, add it as a member of the organization and/or contributor of the repo, then create and use a PAT from that service account.