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

[BUG]: Update notification messages to use constant name or github OAuth app name instead of github username in autobot actions #1563

Closed
1 task done
anmol-kumar0815 opened this issue Apr 11, 2023 · 2 comments
Labels
Status: Stale Used by stalebot to clean house Status: Up for grabs Issues that are ready to be worked on by anyone Type: Support Any questions, information, or general needs around the SDK or GitHub APIs

Comments

@anmol-kumar0815
Copy link

What happened?

  • I have created a GitHub autobot application in Ruby on Rails using Octokit and GitHub OAuth app. In this application, I have used an access token provided by GitHub to generate an instance of the Octokit client.

  • When Octokit performs any GitHub action, such as adding a label, it displays my GitHub username to show notifications on the GitHub UI, like 'anmol-kumar added bug label.' Instead, I would like to display a constant name, 'Autobot' or github OAuth app name, such as 'Autobot added bug label'."

class GithubService
  attr_accessor :github_access_token

  def initialize(github_access_token)
    @github_access_token = github_access_token
  end

  def client
    @_client ||= Octokit::Client.new({bearer_token: github_access_token, auto_paginate: true, user_agent: "Autobot"})
  end

  def assign_labels(repo_full_name, issue_number, labels)
    client.add_labels_to_an_issue(repo_full_name, issue_number, labels)
  end
end
  • I tried to achieve this by setting user_agent, but GitHub still uses my username instead of 'Autobot'.

Thanks for your help in advance!

Versions

octokit version: 6.0.1
ruby version: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-darwin21]

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@anmol-kumar0815 anmol-kumar0815 added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Apr 11, 2023
@kfcampbell kfcampbell added Priority: Normal Status: Up for grabs Issues that are ready to be worked on by anyone Type: Support Any questions, information, or general needs around the SDK or GitHub APIs and removed Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Apr 11, 2023
@kfcampbell
Copy link
Member

Can you describe more about the token you're using and how it's generated?

Copy link

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Apr 20, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Used by stalebot to clean house Status: Up for grabs Issues that are ready to be worked on by anyone Type: Support Any questions, information, or general needs around the SDK or GitHub APIs
Projects
Archived in project
Development

No branches or pull requests

3 participants