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

CI: add workflow for branding name checks #787

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tuhaihe
Copy link
Member

@tuhaihe tuhaihe commented Dec 16, 2024

This commit adds a GitHub Actions workflow to check pull request (PR) diffs for outdated terms such as "Cloudberry Database", "Greenplum", and related variations.

The workflow scans only modified or added lines in the PR to identify outdated branding name. If detected, it posts a comment suggesting the use of "Apache Cloudberry" or "Cloudberry" as appropriate.

This helps ensure consistent and up-to-date terminology across the project while streamlining the review process.

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


@edespino edespino self-requested a review December 16, 2024 10:54
This commit adds a GitHub Actions workflow to check pull request (PR)
diffs for outdated terms such as "Cloudberry Database", "Greenplum",
and related variations.

The workflow scans only modified or added lines in the PR to identify
outdated branding name. If detected, it posts a comment suggesting the
use of "Apache Cloudberry" or "Cloudberry" as appropriate.

This helps ensure consistent and up-to-date terminology across the
project while streamlining the review process.
@tuhaihe tuhaihe force-pushed the check-name-workflow branch from 2782119 to 03b529a Compare December 19, 2024 08:40
@tuhaihe
Copy link
Member Author

tuhaihe commented Dec 19, 2024

I created this file with the help of ChatGPT to check the commits for brand name.

Seems not had the access to post the comments.

github-token: ***
    debug: false
    user-agent: actions/github-script
    result-encoding: json
    retries: 0
    retry-exempt-status-codes: 400,401,403,404,422
Error checking for deprecated terms: RequestError [HttpError]: Resource not accessible by integration
    at /home/runner/work/_actions/actions/github-script/v6/dist/index.js:6842:21
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:15143:16), <anonymous>:62:5)
    at async main (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:15236:20) {
  status: 403,
  response: {
    url: 'https://api.github.com/repos/apache/cloudberry/issues/787/comments',
    status: 403,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      'content-encoding': 'gzip',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Thu, 19 Dec 2024 08:40:38 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'github.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      'transfer-encoding': 'chunked',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-accepted-github-permissions': 'issues=write; pull_requests=write',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-api-version-selected': '2022-11-28',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': 'B7C0:2165[76](https://github.com/apache/cloudberry/actions/runs/12409149152/job/34642168577?pr=787#step:3:76):AA9DE6:153A6EA:6763DC06',
      'x-ratelimit-limit': '15000',
      'x-ratelimit-remaining': '14996',
      'x-ratelimit-reset': '1734599619',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '4',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Resource not accessible by integration',
      documentation_url: 'https://docs.github.com/rest/issues/comments#create-an-issue-comment',
      status: '403'
    }
  },
  request: {
    method: 'POST',
    url: 'https://api.github.com/repos/apache/cloudberry/issues/[78](https://github.com/apache/cloudberry/actions/runs/12409149152/job/34642168577?pr=787#step:3:78)7/comments',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'actions/github-script octokit-core.js/3.6.0 Node.js/20.18.0 (linux; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: '{"body":"\\n  > [!NOTE]\\n  > This is not a required check for merging this PR, just for your reference.\\n\\n   **Attention:** The following old brand terms were found in your changes: `Cloudberry Database`,`CloudberryDB`,`Cloudberry DB`,`Greenplum Database`,`Greenplum`,`GPDB`\\n\\n  Please consider replacing them with \\"Apache Cloudberry\\" or \\"Cloudberry\\" where appropriate. Thank you for ensuring consistency in our branding! 🙏\\n  "}',
    request: { agent: [Agent], hook: [Function: bound bound register] }
  }

Welcome to have your help with this. Thanks in advance.

@tuhaihe
Copy link
Member Author

tuhaihe commented Dec 19, 2024

Tested it on my own repo. If it runs successfully, it will be like this:

image

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.

1 participant