Skip to content

Commit

Permalink
excluding bot account before twitter api call
Browse files Browse the repository at this point in the history
  • Loading branch information
14Richa committed Jul 18, 2023
1 parent 0e97613 commit 2acd8b3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/update-maintainers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,16 @@ jobs:

// Update for added usernames
for (const username of addedUsernames) {
const { data } = await octokit.users.getByUsername({ username });
const twitterUsername = data.twitter_username;

// Exclude bot accounts
if (username === 'asyncapi-bot' || username === 'asyncapi-bot-eve') {
console.log('Skipping bot account:', username);
return; // Skip the iteration for bot accounts
continue; // Skip the iteration for bot accounts
}

const maintainer = maintainers.find(maintainer => maintainer.github === username);
if (!maintainer) {
const { data } = await octokit.users.getByUsername({ username });
const twitterUsername = data.twitter_username;
maintainers.push({
github: username,
twitter: twitterUsername,
Expand Down

0 comments on commit 2acd8b3

Please sign in to comment.