Skip to content

[ci](fix) adjust GITHUB_TOKEN permissions #39553

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

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

hello-stephen
Copy link
Contributor

when pr needs to skip the TeamCity build, an error occurs like below,

curl -L -X POST -H 'Accept: application/vnd.github+json' -H 'Authorization: ***' -H 'X-GitHub-Api-Version: 2022-11-28' https://api.github.com/repos/apache/doris/statuses/efa07c9ec476b4841bace614df58a98e62d22176 -d '{"state":"success","target_url":"","description":"Skip teamCity build","context":"FE UT (Doris FE UT)"}'
{
  "message": "Resource not accessible by integration",
  "documentation_url": "https://docs.github.com/rest/commits/statuses#create-a-commit-status",
  "status": "403"
}

it seems that GITHUB_TOKEN has changed the default permission.
According to the document https://docs.github.com/zh/actions/writing-workflows/workflow-syntax-for-github-actions#permissions, I try to set the required permission to fix this problem.

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Aug 19, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

Copy link
Contributor

PR approved by anyone and no changes requested.

@hello-stephen hello-stephen merged commit 4a669f7 into apache:master Aug 19, 2024
28 of 30 checks passed
@hello-stephen hello-stephen deleted the 0819-ci-permisson branch August 19, 2024 07:30
dataroaring pushed a commit that referenced this pull request Oct 9, 2024
when pr needs to skip the TeamCity build, an error occurs like below,
```
curl -L -X POST -H 'Accept: application/vnd.github+json' -H 'Authorization: ***' -H 'X-GitHub-Api-Version: 2022-11-28' https://api.github.com/repos/apache/doris/statuses/efa07c9ec476b4841bace614df58a98e62d22176 -d '{"state":"success","target_url":"","description":"Skip teamCity build","context":"FE UT (Doris FE UT)"}'
{
  "message": "Resource not accessible by integration",
  "documentation_url": "https://docs.github.com/rest/commits/statuses#create-a-commit-status",
  "status": "403"
}
```
it seems that GITHUB_TOKEN has changed the default permission.
According to the document
https://docs.github.com/zh/actions/writing-workflows/workflow-syntax-for-github-actions#permissions,
I try to set the required permission to fix this problem.

Co-authored-by: stephen <hello-stephen@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/3.0.3-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants