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

Rename Monetization.java to Monetization.java..usagw #11751

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

Conversation

Camille0183
Copy link

Tags
Users
Companies
COLLECTIVES
Google Cloud
Twilio
TEAMS
Create free Team
SQL Server replication using FTP
Asked 10 years, 6 months ago
Modified 4 years, 10 months ago
Viewed 4k times

Report this ad

4

I have: SQL A - publisher (SQL 2008 R2 Dev) SQL B - subscriber (SQL 2008 R2 Standard)

SQL A and SQL B are on different networks, not direct connection is allowed.

I enable FTP publishing on SQL A. Created subscription on SQL B to get files from FTP.

But for some reason when I ran agent on SQL B it gives an error can't connect to SQL A. Uhmm, duh? Of course because it is FTP replication, there is no connection.

What am I doing wrong?

-- THIS IS ON PUBLISHER:
-- Enabling the replication database
use master
exec sp_replicationdboption @dbname = N'Publisher_DB', @optname = N'publish', @value = N'true' GO

exec [Publisher_DB].sys.sp_addlogreader_agent @job_login = null, @job_password = null, @publisher_security_mode = 1 GO
exec [Publisher_DB].sys.sp_addqreader_agent @job_login = null, @job_password = null, @frompublisher = 1 GO
-- Adding the snapshot publication
use [Publisher_DB]
exec sp_addpublication @Publication = N'Test_S', @description = N'Snapshot publication of database ''Publisher_DB'' from Publisher ''SQL-A''.', @sync_method = N'native', @retention = 0, @allow_push = N'true', @allow_pull = N'true', @allow_anonymous = N'true', @enabled_for_internet = N'true', @snapshot_in_defaultfolder = N'false', @alt_snapshot_folder = N'\SQL-A\D$\SqlReplica', @compress_snapshot = N'true', @ftp_address = N'SQL-A', @ftp_port = 21, @ftp_subdirectory = N'\SQL-A\D$\SqlReplica', @ftp_login = N'anonymous', @allow_subscription_copy = N'true', @add_to_active_directory = N'false', @repl_freq = N'snapshot', @status = N'active', @independent_agent = N'true', @immediate_sync = N'true', @allow_sync_tran = N'false', @autogen_sync_procs = N'false', @allow_queued_tran = N'false', @allow_dts = N'false', @replicate_ddl = 1 GO

exec sp_addpublication_snapshot @Publication = N'Test_S', @frequency_type = 1, @frequency_interval = 0, @frequency_relative_interval = 0, @frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = null, @job_password = null, @publisher_security_mode = 1 exec sp_grant_publication_access @Publication = N'Test_S', @login = N'sa' GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'NT AUTHORITY\SYSTEM' GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'NT AUTHORITY\NETWORK SERVICE' GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'DOMAIN\Developers & Test Admins' GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'distributor_admin' GO

-- Adding the snapshot articles
use [Publisher_DB]
exec sp_addarticle @Publication = N'Test_S', @Article = N'test_table', @source_owner = N'dbo', @source_object = N'test_table', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x000000000803509D, @identityrangemanagementoption = N'none', @destination_table = N'test_table', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'SQL', @del_cmd = N'SQL', @upd_cmd = N'SQL' GO

-- Adding the snapshot subscriptions
use [Publisher_DB]
exec sp_addsubscription @Publication = N'Test_S', @subscriber = N'SQL-B', @destination_db = N'Publisher_DB', @subscription_type = N'Pull', @sync_type = N'automatic', @Article = N'all', @update_mode = N'read only', @subscriber_type = 0 GO

-----------------BEGIN: Script to be run at Publisher 'SQL-A'--------------- use [Publisher_DB]
exec sp_addsubscription @Publication = N'Test_S', @subscriber = N'SQL-B', @destination_db = N'Publisher_DB', @sync_type = N'Automatic', @subscription_type = N'pull', @update_mode = N'read only' GO
-----------------END: Script to be run at Publisher 'SQL-A'-----------------

-----------------BEGIN: Script to be run at Subscriber 'SQL-A'-------------- use [Publisher_DB]
exec sp_addpullsubscription @publisher = N'SQL-A', @Publication = N'Test_S', @publisher_db = N'Publisher_DB', @independent_agent = N'True', @subscription_type = N'pull', @description = N'', @update_mode = N'read only', @immediate_sync = 1

exec sp_addpullsubscription_agent @publisher = N'SQL-A', @publisher_db = N'Publisher_DB', @Publication = N'Test_S', @distributor = N'SQL-B', @distributor_security_mode = 1, @distributor_login = N'', @distributor_password = null, @enabled_for_syncmgr = N'False', @frequency_type = 64, @frequency_interval = 0, @frequency_relative_interval = 0, @frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 20120622, @active_end_date = 99991231, @alt_snapshot_folder = N'\SQL-B\D$\SqlReplica\ftp', @working_directory = N'\SQL-B\D$\SqlReplica\ftp', @use_ftp = N'False', @job_login = null, @job_password = null, @publication_type = 0 GO
-----------------END: Script to be run at Subscriber 'SQL-A'--------------- Tags
Users
Companies
COLLECTIVES
Google Cloud
Twilio
TEAMS
Create free Team
SQL Server replication using FTP
Asked 10 years, 6 months ago
Modified 4 years, 10 months ago
Viewed 4k times

Report this ad

4

I have: SQL A - publisher (SQL 2008 R2 Dev) SQL B - subscriber (SQL 2008 R2 Standard)

SQL A and SQL B are on different networks, not direct connection is allowed.

I enable FTP publishing on SQL A. Created subscription on SQL B to get files from FTP.

But for some reason when I ran agent on SQL B it gives an error can't connect to SQL A. Uhmm, duh? Of course because it is FTP replication, there is no connection.

What am I doing wrong?

-- THIS IS ON PUBLISHER:
-- Enabling the replication database
use master
exec sp_replicationdboption @dbname = N'Publisher_DB', @optname = N'publish', @value = N'true' GO

exec [Publisher_DB].sys.sp_addlogreader_agent @job_login = null, @job_password = null, @publisher_security_mode = 1 GO
exec [Publisher_DB].sys.sp_addqreader_agent @job_login = null, @job_password = null, @frompublisher = 1 GO
-- Adding the snapshot publication
use [Publisher_DB]
exec sp_addpublication @Publication = N'Test_S', @description = N'Snapshot publication of database ''Publisher_DB'' from Publisher ''SQL-A''.', @sync_method = N'native', @retention = 0, @allow_push = N'true', @allow_pull = N'true', @allow_anonymous = N'true', @enabled_for_internet = N'true', @snapshot_in_defaultfolder = N'false', @alt_snapshot_folder = N'\SQL-A\D$\SqlReplica', @compress_snapshot = N'true', @ftp_address = N'SQL-A', @ftp_port = 21, @ftp_subdirectory = N'\SQL-A\D$\SqlReplica', @ftp_login = N'anonymous', @allow_subscription_copy = N'true', @add_to_active_directory = N'false', @repl_freq = N'snapshot', @status = N'active', @independent_agent = N'true', @immediate_sync = N'true', @allow_sync_tran = N'false', @autogen_sync_procs = N'false', @allow_queued_tran = N'false', @allow_dts = N'false', @replicate_ddl = 1 GO

exec sp_addpublication_snapshot @Publication = N'Test_S', @frequency_type = 1, @frequency_interval = 0, @frequency_relative_interval = 0, @frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = null, @job_password = null, @publisher_security_mode = 1 exec sp_grant_publication_access @Publication = N'Test_S', @login = N'sa' GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'NT AUTHORITY\SYSTEM' GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'NT AUTHORITY\NETWORK SERVICE' GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'DOMAIN\Developers & Test Admins' GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'distributor_admin' GO

-- Adding the snapshot articles
use [Publisher_DB]
exec sp_addarticle @Publication = N'Test_S', @Article = N'test_table', @source_owner = N'dbo', @source_object = N'test_table', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x000000000803509D, @identityrangemanagementoption = N'none', @destination_table = N'test_table', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'SQL', @del_cmd = N'SQL', @upd_cmd = N'SQL' GO

-- Adding the snapshot subscriptions
use [Publisher_DB]
exec sp_addsubscription @Publication = N'Test_S', @subscriber = N'SQL-B', @destination_db = N'Publisher_DB', @subscription_type = N'Pull', @sync_type = N'automatic', @Article = N'all', @update_mode = N'read only', @subscriber_type = 0 GO

-----------------BEGIN: Script to be run at Publisher 'SQL-A'--------------- use [Publisher_DB]
exec sp_addsubscription @Publication = N'Test_S', @subscriber = N'SQL-B', @destination_db = N'Publisher_DB', @sync_type = N'Automatic', @subscription_type = N'pull', @update_mode = N'read only' GO
-----------------END: Script to be run at Publisher 'SQL-A'-----------------

-----------------BEGIN: Script to be run at Subscriber 'SQL-A'-------------- use [Publisher_DB]
exec sp_addpullsubscription @publisher = N'SQL-A', @Publication = N'Test_S', @publisher_db = N'Publisher_DB', @independent_agent = N'True', @subscription_type = N'pull', @description = N'', @update_mode = N'read only', @immediate_sync = 1

exec sp_addpullsubscription_agent @publisher = N'SQL-A', @publisher_db = N'Publisher_DB', @Publication = N'Test_S', @distributor = N'SQL-B', @distributor_security_mode = 1, @distributor_login = N'', @distributor_password = null, @enabled_for_syncmgr = N'False', @frequency_type = 64, @frequency_interval = 0, @frequency_relative_interval = 0, @frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 20120622, @active_end_date = 99991231, @alt_snapshot_folder = N'\SQL-B\D$\SqlReplica\ftp', @working_directory = N'\SQL-B\D$\SqlReplica\ftp', @use_ftp = N'False', @job_login = null, @job_password = null, @publication_type = 0 GO
-----------------END: Script to be run at Subscriber 'SQL-A'--------------- sql-server-2008replicationpublishersubscriber
carbon-apimgt/APIAuthenticationHandler.java at master - GitHub https://github.com › wso2 › gateway › handlers › securityself.topRightGameStatePublished var topLeftGameState: GameState = .notReady @Published var topRightGameState: GameState = .notReady @Published var bottomLeftGameState: GameState = .notReady

private let timerPublisher = Timer.publish(every: 0.01, on: .main, in: .common) // ...
timerPublisher.autoconnect().sink(receiveValue: { currentDate in
switch self.globalGameState {
case .running(startDate: let startDate):
let elapsedTime = currentDate - startDate
if self.topLeftGameState == .ready { //, {
self.topLeftGameState = .running(elapsedTime: elapsedTime.timeInterval)
}
if case .running(elapsedTime: _) = self.topLeftGameState {
self.topLeftGameState = .running(elapsedTime: elapsedTime.timeInterval)
}

        if self.topRightGameState == .ready { //,   {
            self.topRightGameState = .running(elapsedTime: elapsedTime.timeInterval)
        }
        if case .running(elapsedTime: _) = self.topRightGameState {
            self.topRightGameState = .running(elapsedTime: elapsedTime.timeInterval)
        }
        
        if self.bottomLeftGameState == .ready { //,   {
            self.bottomLeftGameState = .running(elapsedTime: elapsedTime.timeInterval)
        }
        if case .running(elapsedTime: _) = self.bottomLeftGameState {
            self.bottomLeftGameState = .running(elapsedTime: elapsedTime.timeInterval)
        }
    default: ()
    }
}).store(in: &cancellables)

So this code looks really ugly and I would like to write a function for all the @Published variables:

addTimePublisher(for: topLeftGameState)
addTimePublisher(for: topRightGameState)
    //...
private func addTimePublisher(for gameState: Published<GameState>.Publisher) {
    timerPublisher.autoconnect().sink(receiveValue: { currentDate in
        switch self.globalGameState {
        case .running(startDate: let startDate):
            let elapsedTime = currentDate - startDate
            if self.gameState == .ready {
                self.gameState = .running(elapsedTime: elapsedTime.timeInterval)
            }
            if case .running(elapsedTime: _) = self.gameState {
                self.gameState = .running(elapsedTime: elapsedTime.timeInterval)
            }
            
        default: ()
        }
        print(currentDate)
    }).store(in: &cancellables)
}

This throw an error: Cannot infer contextual base in reference to member 'ready'

I do not know how to get the appropriate value from the publisher? Does anyone have any advice for me?

Edit: How can I write a function and pass @Published variables?

swiftuipublisher
Share
Edit
Follow
edited Oct 29, 2020 at 5:00
asked Oct 28, 2020 at 16:51
kuzdu's user avatar
kuzdu
6,83111 gold badge4949 silver badges6464 bronze badges It would make more sense to inject the entire viewModel with the published property as an EnvironmentObject rather than trying to pass in individual @Published properties. – Andy Ibanez
Oct 28, 2020 at 18:52
Unclear to me what you're doing. What does "connected to the timerPublisher" mean? How and where are you attempting to call addTimePublisher and where is all of this happening - in the same view model? You might be asking an X-Y question. But to answer your last question - to get the value from a publisher you need to subscribe to (with .sink, just like you did with the timer publisher). I'm guessing that's not what you actually need – New Dev
Oct 28, 2020 at 20:38
I'm sorry, I updated my question. –
kuzdu
Oct 29, 2020 at 5:00
Add a [email protected]:wso2/carbon-apimgt.gitgit@github.combe51160b94f5cb2d5c819a36800d5c1f81e24dd2 sql-server-2008replicationpublishersubscriber

Tags
Users
Companies
COLLECTIVES
Google Cloud
Twilio
TEAMS
Create free Team
SQL Server replication using FTP
Asked 10 years, 6 months ago
Modified 4 years, 10 months ago
Viewed 4k times

Report this ad

4


I have: SQL A - publisher (SQL 2008 R2 Dev) SQL B - subscriber (SQL 2008 R2 Standard)

SQL A and SQL B are on different networks, not direct connection is allowed.

I enable FTP publishing on SQL A. Created subscription on SQL B to get files from FTP.

But for some reason when I ran agent on SQL B it gives an error can't connect to SQL A. Uhmm, duh? Of course because it is FTP replication, there is no connection.

What am I doing wrong?

-- THIS IS ON PUBLISHER:
-- Enabling the replication database
use master
exec sp_replicationdboption @dbname = N'Publisher_DB', @optname = N'publish', @value = N'true'
GO

exec [Publisher_DB].sys.sp_addlogreader_agent @job_login = null, @job_password = null, @publisher_security_mode = 1
GO
exec [Publisher_DB].sys.sp_addqreader_agent @job_login = null, @job_password = null, @frompublisher = 1
GO
-- Adding the snapshot publication
use [Publisher_DB]
exec sp_addpublication @Publication = N'Test_S', @description = N'Snapshot publication of database ''Publisher_DB'' from Publisher ''SQL-A''.', @sync_method = N'native', @retention = 0, @allow_push = N'true', @allow_pull = N'true', @allow_anonymous = N'true', @enabled_for_internet = N'true', @snapshot_in_defaultfolder = N'false', @alt_snapshot_folder = N'\\SQL-A\D$\SqlReplica', @compress_snapshot = N'true', @ftp_address = N'SQL-A', @ftp_port = 21, @ftp_subdirectory = N'\\SQL-A\D$\SqlReplica', @ftp_login = N'anonymous', @allow_subscription_copy = N'true', @add_to_active_directory = N'false', @repl_freq = N'snapshot', @status = N'active', @independent_agent = N'true', @immediate_sync = N'true', @allow_sync_tran = N'false', @autogen_sync_procs = N'false', @allow_queued_tran = N'false', @allow_dts = N'false', @replicate_ddl = 1
GO    

exec sp_addpublication_snapshot @Publication = N'Test_S', @frequency_type = 1, @frequency_interval = 0, @frequency_relative_interval = 0, @frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = null, @job_password = null, @publisher_security_mode = 1
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'sa'
GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'NT AUTHORITY\SYSTEM'
GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'NT AUTHORITY\NETWORK SERVICE'
GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'DOMAIN\Developers & Test Admins'
GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'distributor_admin'
GO

-- Adding the snapshot articles
use [Publisher_DB]
exec sp_addarticle @Publication = N'Test_S', @Article = N'test_table', @source_owner = N'dbo', @source_object = N'test_table', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x000000000803509D, @identityrangemanagementoption = N'none', @destination_table = N'test_table', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'SQL', @del_cmd = N'SQL', @upd_cmd = N'SQL'
GO

-- Adding the snapshot subscriptions
use [Publisher_DB]
exec sp_addsubscription @Publication = N'Test_S', @subscriber = N'SQL-B', @destination_db = N'Publisher_DB', @subscription_type = N'Pull', @sync_type = N'automatic', @Article = N'all', @update_mode = N'read only', @subscriber_type = 0
GO

-----------------BEGIN: Script to be run at Publisher 'SQL-A'---------------
use [Publisher_DB]
exec sp_addsubscription @Publication = N'Test_S', @subscriber = N'SQL-B', @destination_db = N'Publisher_DB', @sync_type = N'Automatic', @subscription_type = N'pull', @update_mode = N'read only'
GO
-----------------END: Script to be run at Publisher 'SQL-A'-----------------       

-----------------BEGIN: Script to be run at Subscriber 'SQL-A'--------------
use [Publisher_DB]
exec sp_addpullsubscription @publisher = N'SQL-A', @Publication = N'Test_S', @publisher_db = N'Publisher_DB', @independent_agent = N'True', @subscription_type = N'pull', @description = N'', @update_mode = N'read only', @immediate_sync = 1

exec sp_addpullsubscription_agent @publisher = N'SQL-A', @publisher_db = N'Publisher_DB', @Publication = N'Test_S', @distributor = N'SQL-B', @distributor_security_mode = 1, @distributor_login = N'', @distributor_password = null, @enabled_for_syncmgr = N'False', @frequency_type = 64, @frequency_interval = 0, @frequency_relative_interval = 0, @frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 20120622, @active_end_date = 99991231, @alt_snapshot_folder = N'\\SQL-B\D$\SqlReplica\ftp', @working_directory = N'\\SQL-B\D$\SqlReplica\ftp', @use_ftp = N'False', @job_login = null, @job_password = null, @publication_type = 0
GO
-----------------END: Script to be run at Subscriber 'SQL-A'---------------
Tags
Users
Companies
COLLECTIVES
Google Cloud
Twilio
TEAMS
Create free Team
SQL Server replication using FTP
Asked 10 years, 6 months ago
Modified 4 years, 10 months ago
Viewed 4k times

Report this ad

4


I have: SQL A - publisher (SQL 2008 R2 Dev) SQL B - subscriber (SQL 2008 R2 Standard)

SQL A and SQL B are on different networks, not direct connection is allowed.

I enable FTP publishing on SQL A. Created subscription on SQL B to get files from FTP.

But for some reason when I ran agent on SQL B it gives an error can't connect to SQL A. Uhmm, duh? Of course because it is FTP replication, there is no connection.

What am I doing wrong?

-- THIS IS ON PUBLISHER:
-- Enabling the replication database
use master
exec sp_replicationdboption @dbname = N'Publisher_DB', @optname = N'publish', @value = N'true'
GO

exec [Publisher_DB].sys.sp_addlogreader_agent @job_login = null, @job_password = null, @publisher_security_mode = 1
GO
exec [Publisher_DB].sys.sp_addqreader_agent @job_login = null, @job_password = null, @frompublisher = 1
GO
-- Adding the snapshot publication
use [Publisher_DB]
exec sp_addpublication @Publication = N'Test_S', @description = N'Snapshot publication of database ''Publisher_DB'' from Publisher ''SQL-A''.', @sync_method = N'native', @retention = 0, @allow_push = N'true', @allow_pull = N'true', @allow_anonymous = N'true', @enabled_for_internet = N'true', @snapshot_in_defaultfolder = N'false', @alt_snapshot_folder = N'\\SQL-A\D$\SqlReplica', @compress_snapshot = N'true', @ftp_address = N'SQL-A', @ftp_port = 21, @ftp_subdirectory = N'\\SQL-A\D$\SqlReplica', @ftp_login = N'anonymous', @allow_subscription_copy = N'true', @add_to_active_directory = N'false', @repl_freq = N'snapshot', @status = N'active', @independent_agent = N'true', @immediate_sync = N'true', @allow_sync_tran = N'false', @autogen_sync_procs = N'false', @allow_queued_tran = N'false', @allow_dts = N'false', @replicate_ddl = 1
GO    

exec sp_addpublication_snapshot @Publication = N'Test_S', @frequency_type = 1, @frequency_interval = 0, @frequency_relative_interval = 0, @frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = null, @job_password = null, @publisher_security_mode = 1
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'sa'
GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'NT AUTHORITY\SYSTEM'
GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'NT AUTHORITY\NETWORK SERVICE'
GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'DOMAIN\Developers & Test Admins'
GO
exec sp_grant_publication_access @Publication = N'Test_S', @login = N'distributor_admin'
GO

-- Adding the snapshot articles
use [Publisher_DB]
exec sp_addarticle @Publication = N'Test_S', @Article = N'test_table', @source_owner = N'dbo', @source_object = N'test_table', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x000000000803509D, @identityrangemanagementoption = N'none', @destination_table = N'test_table', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'SQL', @del_cmd = N'SQL', @upd_cmd = N'SQL'
GO

-- Adding the snapshot subscriptions
use [Publisher_DB]
exec sp_addsubscription @Publication = N'Test_S', @subscriber = N'SQL-B', @destination_db = N'Publisher_DB', @subscription_type = N'Pull', @sync_type = N'automatic', @Article = N'all', @update_mode = N'read only', @subscriber_type = 0
GO

-----------------BEGIN: Script to be run at Publisher 'SQL-A'---------------
use [Publisher_DB]
exec sp_addsubscription @Publication = N'Test_S', @subscriber = N'SQL-B', @destination_db = N'Publisher_DB', @sync_type = N'Automatic', @subscription_type = N'pull', @update_mode = N'read only'
GO
-----------------END: Script to be run at Publisher 'SQL-A'-----------------       

-----------------BEGIN: Script to be run at Subscriber 'SQL-A'--------------
use [Publisher_DB]
exec sp_addpullsubscription @publisher = N'SQL-A', @Publication = N'Test_S', @publisher_db = N'Publisher_DB', @independent_agent = N'True', @subscription_type = N'pull', @description = N'', @update_mode = N'read only', @immediate_sync = 1

exec sp_addpullsubscription_agent @publisher = N'SQL-A', @publisher_db = N'Publisher_DB', @Publication = N'Test_S', @distributor = N'SQL-B', @distributor_security_mode = 1, @distributor_login = N'', @distributor_password = null, @enabled_for_syncmgr = N'False', @frequency_type = 64, @frequency_interval = 0, @frequency_relative_interval = 0, @frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 20120622, @active_end_date = 99991231, @alt_snapshot_folder = N'\\SQL-B\D$\SqlReplica\ftp', @working_directory = N'\\SQL-B\D$\SqlReplica\ftp', @use_ftp = N'False', @job_login = null, @job_password = null, @publication_type = 0
GO
-----------------END: Script to be run at Subscriber 'SQL-A'---------------
sql-server-2008replicationpublishersubscriber
carbon-apimgt/APIAuthenticationHandler.java at master - GitHub
https://github.com › wso2 › gateway › handlers › securityself.topRightGameStatePublished var topLeftGameState: GameState = .notReady
@Published var topRightGameState: GameState = .notReady
@Published var bottomLeftGameState: GameState = .notReady

private let timerPublisher = Timer.publish(every: 0.01, on: .main, in: .common)    
// ...
 timerPublisher.autoconnect().sink(receiveValue: { currentDate in
        switch self.globalGameState {
        case .running(startDate: let startDate):
            let elapsedTime = currentDate - startDate
            if self.topLeftGameState == .ready { //,   {
                self.topLeftGameState = .running(elapsedTime: elapsedTime.timeInterval)
            }
            if case .running(elapsedTime: _) = self.topLeftGameState {
                self.topLeftGameState = .running(elapsedTime: elapsedTime.timeInterval)
            }
            
            if self.topRightGameState == .ready { //,   {
                self.topRightGameState = .running(elapsedTime: elapsedTime.timeInterval)
            }
            if case .running(elapsedTime: _) = self.topRightGameState {
                self.topRightGameState = .running(elapsedTime: elapsedTime.timeInterval)
            }
            
            if self.bottomLeftGameState == .ready { //,   {
                self.bottomLeftGameState = .running(elapsedTime: elapsedTime.timeInterval)
            }
            if case .running(elapsedTime: _) = self.bottomLeftGameState {
                self.bottomLeftGameState = .running(elapsedTime: elapsedTime.timeInterval)
            }
        default: ()
        }
    }).store(in: &cancellables)
So this code looks really ugly and I would like to write a function for all the @Published variables:

    addTimePublisher(for: topLeftGameState)
    addTimePublisher(for: topRightGameState)
        //...
    private func addTimePublisher(for gameState: Published<GameState>.Publisher) {
        timerPublisher.autoconnect().sink(receiveValue: { currentDate in
            switch self.globalGameState {
            case .running(startDate: let startDate):
                let elapsedTime = currentDate - startDate
                if self.gameState == .ready {
                    self.gameState = .running(elapsedTime: elapsedTime.timeInterval)
                }
                if case .running(elapsedTime: _) = self.gameState {
                    self.gameState = .running(elapsedTime: elapsedTime.timeInterval)
                }
                
            default: ()
            }
            print(currentDate)
        }).store(in: &cancellables)
    }
This throw an error: Cannot infer contextual base in reference to member 'ready'

I do not know how to get the appropriate value from the publisher? Does anyone have any advice for me?

Edit: How can I write a function and pass @Published variables?

swiftuipublisher
Share
Edit
Follow
edited Oct 29, 2020 at 5:00
asked Oct 28, 2020 at 16:51
kuzdu's user avatar
kuzdu
6,83111 gold badge4949 silver badges6464 bronze badges
It would make more sense to inject the entire viewModel with the published property as an EnvironmentObject rather than trying to pass in individual @Published properties. – 
Andy Ibanez
 Oct 28, 2020 at 18:52
Unclear to me what you're doing. What does "connected to the timerPublisher" mean? How and where are you attempting to call addTimePublisher and where is all of this happening - in the same view model? You might be asking an X-Y question. But to answer your last question - to get the value from a publisher you need to subscribe to (with .sink, just like you did with the timer publisher). I'm guessing that's not what you actually need – 
New Dev
 Oct 28, 2020 at 20:38
I'm sorry, I updated my question. – 
kuzdu
 Oct 29, 2020 at 5:00
Add a [email protected]:wso2/carbon-apimgt.gitgit@github.combe51160b94f5cb2d5c819a36800d5c1f81e24dd2
sql-server-2008replicationpublishersubscriber
@CLAassistant
Copy link

CLAassistant commented Jan 9, 2023

CLA assistant check
All committers have signed the CLA.

@Camille0183
Copy link
Author

Approving workflow runs on a pull request from a public fork
When an outside contributor submits a pull request to a public repository, a maintainer with write access may need to approve any workflow runs.

About workflow runs from public forks
Anyone can fork a public repository, and then submit a pull request that proposes changes to the repository's GitHub Actions workflows. Although workflows from forks do not have access to sensitive data such as secrets, they can be an annoyance for maintainers if they are modified for abusive purposes.

To help prevent this, workflows on pull requests to public repositories from some outside contributors will not run automatically, and might need to be approved first. By default, all first-time contributors require approval to run workflows.

Note: Workflows triggered by pull_request_target events are run in the context of the base branch. Since the base branch is considered trusted, workflows triggered by these events will always run, regardless of approval settings.

You can configure workflow approval requirements for a repository, organization, or enterprise.

Workflow runs that have been awaiting approval for more than 30 days are automatically deleted.

Approving workflow runs on a pull request from a public fork
Maintainers with write access to a repository can use the following procedure to review and run workflows on pull requests from contributors that require approval.

Under your repository name, click Pull requests.

Issues and pull requests tab selection

In the list of pull requests, click the pull request you'd like to review.

On the pull request, click Files changed.
Pull Request Files changed tab

Inspect the proposed changes in the pull request and ensure that you are comfortable running your workflows on the pull request branch. You should be especially alert to any proposed changes in the .github/workflows/ directory that affect workflow files.

If you are comfortable with running workflows on the pull request branch, return to the Conversation tab, and under "Workflow(s) awaiting approval", click Approve and run.

Approve and run workflows

@Camille0183 Camille0183 closed this Jan 9, 2023
@Camille0183 Camille0183 reopened this Jan 9, 2023
@Camille0183 Camille0183 closed this Jan 9, 2023
@Camille0183 Camille0183 reopened this Jan 9, 2023
@Camille0183
Copy link
Author

Skip to main content
GitHub Docs
Managing code review settings for your team
In this article
About code review settings
About team notifications
About auto assignment
Configuring team notifications
Configuring auto assignment
Disabling auto assignment
You can decrease noise for your team by limiting notifications when your team is requested to review a pull request.

Who can use this feature
Team maintainers and organization owners can configure code review settings.

Code review settings are available in all public repositories owned by an organization, and all private repositories owned by organizations on GitHub Team, GitHub Enterprise Server 2.20+, and GitHub Enterprise Cloud. For more information, see "GitHub's products."

About code review settings
To reduce noise for your team and clarify individual responsibility for pull request reviews, you can configure code review settings.

Team notifications
Auto assignment
About team notifications
When you choose to only notify requested team members, you disable sending notifications to the entire team when the team is requested to review a pull request if a specific member of that team is also requested for review. This is especially useful when a repository is configured with teams as code owners, but contributors to the repository often know a specific individual that would be the correct reviewer for their pull request. For more information, see "About code owners."

About auto assignment
When you enable auto assignment, any time your team has been requested to review a pull request, the team is removed as a reviewer and a specified subset of team members are assigned in the team's place. Code review assignments allow you to decide whether the whole team or just a subset of team members are notified when a team is requested for review.

When code owners are automatically requested for review, the team is still removed and replaced with individuals unless a branch protection rule is configured to require review from code owners. If such a branch protection rule is in place, the team request cannot be removed and so the individual request will appear in addition.

Routing algorithms
Code review assignments automatically choose and assign reviewers based on one of two possible algorithms.

The round robin algorithm chooses reviewers based on who's received the least recent review request, focusing on alternating between all members of the team regardless of the number of outstanding reviews they currently have.

The load balance algorithm chooses reviewers based on each member's total number of recent review requests and considers the number of outstanding reviews for each member. The load balance algorithm tries to ensure that each team member reviews an equal number of pull requests in any 30 day period.

Any team members that have set their status to "Busy" will not be selected for review. If all team members are busy, the pull request will remain assigned to the team itself. For more information about user statuses, see "Setting a status."

Configuring team notifications
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

In the left sidebar, click Code review.

Select Only notify requested team members.
Code review team notifications

Click Save changes.

Configuring auto assignment
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

In the left sidebar, click Code review.

Select Enable auto assignment.
Auto-assignment button

Under "How many team members should be assigned to review?", use the drop-down menu and choose a number of reviewers to be assigned to each pull request.
Number of reviewers dropdown

Under "Routing algorithm", use the drop-down menu and choose which algorithm you'd like to use. For more information, see "Routing algorithms."
Routing algorithm dropdown

Optionally, to always skip certain members of the team, select Never assign certain team members. Then, select one or more team members you'd like to always skip.
Never assign certain team members checkbox and dropdown

Optionally, to include members of child teams as potential reviewers when assigning requests, select Child team members.

Optionally, to count any members whose review has already been requested against the total number of members to assign, select Count existing requests.

Optionally, to remove the review request from the team when assigning team members, select Team review request.

Click Save changes.

Disabling auto assignment
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

Select Enable auto assignment to remove the checkmark.
Code review assignment button

Click Save changes.

Did this doc help you?

Privacy policy
Help us make these docs great!
All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Or, learn how to contribute.

Still need help?
Ask the GitHub community
Contact support
© 2023 GitHub, Inc.
Terms
Privacy
Security
Status
Help
Contact GitHub
Pricing
Developer API
Training
Blog
About

@Camille0183 Camille0183 closed this Jan 9, 2023
@Camille0183
Copy link
Author

Skip to main content
GitHub Docs
Managing code review settings for your team
In this article
About code review settings
About team notifications
About auto assignment
Configuring team notifications
Configuring auto assignment
Disabling auto assignment
You can decrease noise for your team by limiting notifications when your team is requested to review a pull request.

Who can use this feature
Team maintainers and organization owners can configure code review settings.

Code review settings are available in all public repositories owned by an organization, and all private repositories owned by organizations on GitHub Team, GitHub Enterprise Server 2.20+, and GitHub Enterprise Cloud. For more information, see "GitHub's products."

About code review settings
To reduce noise for your team and clarify individual responsibility for pull request reviews, you can configure code review settings.

Team notifications
Auto assignment
About team notifications
When you choose to only notify requested team members, you disable sending notifications to the entire team when the team is requested to review a pull request if a specific member of that team is also requested for review. This is especially useful when a repository is configured with teams as code owners, but contributors to the repository often know a specific individual that would be the correct reviewer for their pull request. For more information, see "About code owners."

About auto assignment
When you enable auto assignment, any time your team has been requested to review a pull request, the team is removed as a reviewer and a specified subset of team members are assigned in the team's place. Code review assignments allow you to decide whether the whole team or just a subset of team members are notified when a team is requested for review.

When code owners are automatically requested for review, the team is still removed and replaced with individuals unless a branch protection rule is configured to require review from code owners. If such a branch protection rule is in place, the team request cannot be removed and so the individual request will appear in addition.

Routing algorithms
Code review assignments automatically choose and assign reviewers based on one of two possible algorithms.

The round robin algorithm chooses reviewers based on who's received the least recent review request, focusing on alternating between all members of the team regardless of the number of outstanding reviews they currently have.

The load balance algorithm chooses reviewers based on each member's total number of recent review requests and considers the number of outstanding reviews for each member. The load balance algorithm tries to ensure that each team member reviews an equal number of pull requests in any 30 day period.

Any team members that have set their status to "Busy" will not be selected for review. If all team members are busy, the pull request will remain assigned to the team itself. For more information about user statuses, see "Setting a status."

Configuring team notifications
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

In the left sidebar, click Code review.

Select Only notify requested team members.
Code review team notifications

Click Save changes.

Configuring auto assignment
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

In the left sidebar, click Code review.

Select Enable auto assignment.
Auto-assignment button

Under "How many team members should be assigned to review?", use the drop-down menu and choose a number of reviewers to be assigned to each pull request.
Number of reviewers dropdown

Under "Routing algorithm", use the drop-down menu and choose which algorithm you'd like to use. For more information, see "Routing algorithms."
Routing algorithm dropdown

Optionally, to always skip certain members of the team, select Never assign certain team members. Then, select one or more team members you'd like to always skip.
Never assign certain team members checkbox and dropdown

Optionally, to include members of child teams as potential reviewers when assigning requests, select Child team members.

Optionally, to count any members whose review has already been requested against the total number of members to assign, select Count existing requests.

Optionally, to remove the review request from the team when assigning team members, select Team review request.

Click Save changes.

Disabling auto assignment
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

Select Enable auto assignment to remove the checkmark.
Code review assignment button

Click Save changes.

Did this doc help you?

Privacy policy
Help us make these docs great!
All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Or, learn how to contribute.

Still need help?
Ask the GitHub community
Contact support
© 2023 GitHub, Inc.
Terms
Privacy
Security
Status
Help
Contact GitHub
Pricing
Developer API
Training
Blog
About

@Camille0183 Camille0183 reopened this Jan 9, 2023
@Camille0183
Copy link
Author

Skip to main content
GitHub Docs
Managing code review settings for your team
In this article
About code review settings
About team notifications
About auto assignment
Configuring team notifications
Configuring auto assignment
Disabling auto assignment
You can decrease noise for your team by limiting notifications when your team is requested to review a pull request.

Who can use this feature
Team maintainers and organization owners can configure code review settings.

Code review settings are available in all public repositories owned by an organization, and all private repositories owned by organizations on GitHub Team, GitHub Enterprise Server 2.20+, and GitHub Enterprise Cloud. For more information, see "GitHub's products."

About code review settings
To reduce noise for your team and clarify individual responsibility for pull request reviews, you can configure code review settings.

Team notifications
Auto assignment
About team notifications
When you choose to only notify requested team members, you disable sending notifications to the entire team when the team is requested to review a pull request if a specific member of that team is also requested for review. This is especially useful when a repository is configured with teams as code owners, but contributors to the repository often know a specific individual that would be the correct reviewer for their pull request. For more information, see "About code owners."

About auto assignment
When you enable auto assignment, any time your team has been requested to review a pull request, the team is removed as a reviewer and a specified subset of team members are assigned in the team's place. Code review assignments allow you to decide whether the whole team or just a subset of team members are notified when a team is requested for review.

When code owners are automatically requested for review, the team is still removed and replaced with individuals unless a branch protection rule is configured to require review from code owners. If such a branch protection rule is in place, the team request cannot be removed and so the individual request will appear in addition.

Routing algorithms
Code review assignments automatically choose and assign reviewers based on one of two possible algorithms.

The round robin algorithm chooses reviewers based on who's received the least recent review request, focusing on alternating between all members of the team regardless of the number of outstanding reviews they currently have.

The load balance algorithm chooses reviewers based on each member's total number of recent review requests and considers the number of outstanding reviews for each member. The load balance algorithm tries to ensure that each team member reviews an equal number of pull requests in any 30 day period.

Any team members that have set their status to "Busy" will not be selected for review. If all team members are busy, the pull request will remain assigned to the team itself. For more information about user statuses, see "Setting a status."

Configuring team notifications
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

In the left sidebar, click Code review.

Select Only notify requested team members.
Code review team notifications

Click Save changes.

Configuring auto assignment
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

In the left sidebar, click Code review.

Select Enable auto assignment.
Auto-assignment button

Under "How many team members should be assigned to review?", use the drop-down menu and choose a number of reviewers to be assigned to each pull request.
Number of reviewers dropdown

Under "Routing algorithm", use the drop-down menu and choose which algorithm you'd like to use. For more information, see "Routing algorithms."
Routing algorithm dropdown

Optionally, to always skip certain members of the team, select Never assign certain team members. Then, select one or more team members you'd like to always skip.
Never assign certain team members checkbox and dropdown

Optionally, to include members of child teams as potential reviewers when assigning requests, select Child team members.

Optionally, to count any members whose review has already been requested against the total number of members to assign, select Count existing requests.

Optionally, to remove the review request from the team when assigning team members, select Team review request.

Click Save changes.

Disabling auto assignment
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

Select Enable auto assignment to remove the checkmark.
Code review assignment button

Click Save changes.

Did this doc help you?

Privacy policy
Help us make these docs great!
All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Or, learn how to contribute.

Still need help?
Ask the GitHub community
Contact support
© 2023 GitHub, Inc.
Terms
Privacy
Security
Status
Help
Contact GitHub
Pricing
Developer API
Training
Blog
About

1 similar comment
@Camille0183
Copy link
Author

Skip to main content
GitHub Docs
Managing code review settings for your team
In this article
About code review settings
About team notifications
About auto assignment
Configuring team notifications
Configuring auto assignment
Disabling auto assignment
You can decrease noise for your team by limiting notifications when your team is requested to review a pull request.

Who can use this feature
Team maintainers and organization owners can configure code review settings.

Code review settings are available in all public repositories owned by an organization, and all private repositories owned by organizations on GitHub Team, GitHub Enterprise Server 2.20+, and GitHub Enterprise Cloud. For more information, see "GitHub's products."

About code review settings
To reduce noise for your team and clarify individual responsibility for pull request reviews, you can configure code review settings.

Team notifications
Auto assignment
About team notifications
When you choose to only notify requested team members, you disable sending notifications to the entire team when the team is requested to review a pull request if a specific member of that team is also requested for review. This is especially useful when a repository is configured with teams as code owners, but contributors to the repository often know a specific individual that would be the correct reviewer for their pull request. For more information, see "About code owners."

About auto assignment
When you enable auto assignment, any time your team has been requested to review a pull request, the team is removed as a reviewer and a specified subset of team members are assigned in the team's place. Code review assignments allow you to decide whether the whole team or just a subset of team members are notified when a team is requested for review.

When code owners are automatically requested for review, the team is still removed and replaced with individuals unless a branch protection rule is configured to require review from code owners. If such a branch protection rule is in place, the team request cannot be removed and so the individual request will appear in addition.

Routing algorithms
Code review assignments automatically choose and assign reviewers based on one of two possible algorithms.

The round robin algorithm chooses reviewers based on who's received the least recent review request, focusing on alternating between all members of the team regardless of the number of outstanding reviews they currently have.

The load balance algorithm chooses reviewers based on each member's total number of recent review requests and considers the number of outstanding reviews for each member. The load balance algorithm tries to ensure that each team member reviews an equal number of pull requests in any 30 day period.

Any team members that have set their status to "Busy" will not be selected for review. If all team members are busy, the pull request will remain assigned to the team itself. For more information about user statuses, see "Setting a status."

Configuring team notifications
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

In the left sidebar, click Code review.

Select Only notify requested team members.
Code review team notifications

Click Save changes.

Configuring auto assignment
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

In the left sidebar, click Code review.

Select Enable auto assignment.
Auto-assignment button

Under "How many team members should be assigned to review?", use the drop-down menu and choose a number of reviewers to be assigned to each pull request.
Number of reviewers dropdown

Under "Routing algorithm", use the drop-down menu and choose which algorithm you'd like to use. For more information, see "Routing algorithms."
Routing algorithm dropdown

Optionally, to always skip certain members of the team, select Never assign certain team members. Then, select one or more team members you'd like to always skip.
Never assign certain team members checkbox and dropdown

Optionally, to include members of child teams as potential reviewers when assigning requests, select Child team members.

Optionally, to count any members whose review has already been requested against the total number of members to assign, select Count existing requests.

Optionally, to remove the review request from the team when assigning team members, select Team review request.

Click Save changes.

Disabling auto assignment
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

Select Enable auto assignment to remove the checkmark.
Code review assignment button

Click Save changes.

Did this doc help you?

Privacy policy
Help us make these docs great!
All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Or, learn how to contribute.

Still need help?
Ask the GitHub community
Contact support
© 2023 GitHub, Inc.
Terms
Privacy
Security
Status
Help
Contact GitHub
Pricing
Developer API
Training
Blog
About

@Camille0183 Camille0183 closed this Jan 9, 2023
@Camille0183 Camille0183 reopened this Jan 9, 2023
Copy link
Author

@Camille0183 Camille0183 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/Monetization.java..usagw

@Camille0183
Copy link
Author

Nothingcomponents/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/Monetization.java..usagwApproving workflow runs on a pull request from a public fork
When an outside contributor submits a pull request to a public repository, a maintainer with write access may need to approve any workflow runs.

About workflow runs from public forks
Anyone can fork a public repository, and then submit a pull request that proposes changes to the repository's GitHub Actions workflows. Although workflows from forks do not have access to sensitive data such as secrets, they can be an annoyance for maintainers if they are modified for abusive purposes.

To help prevent this, workflows on pull requests to public repositories from some outside contributors will not run automatically, and might need to be approved first. By default, all first-time contributors require approval to run workflows.

Note: Workflows triggered by pull_request_target events are run in the context of the base branch. Since the base branch is considered trusted, workflows triggered by these events will always run, regardless of approval settings.

You can configure workflow approval requirements for a repository, organization, or enterprise.

Workflow runs that have been awaiting approval for more than 30 days are automatically deleted.

Approving workflow runs on a pull request from a public fork
Maintainers with write access to a repository can use the following procedure to review and run workflows on pull requests from contributors that require approval.

Under your repository name, click Pull requests.

Issues and pull requests tab selection

In the list of pull requests, click the pull request you'd like to review.

On the pull request, click Files changed.
Pull Request Files changed tab

Inspect the proposed changes in the pull request and ensure that you are comfortable running your workflows on the pull request branch. You should be especially alert to any proposed changes in the .github/workflows/ directory that affect workflow files.

If you are comfortable with running workflows on the pull request branch, return to the Conversation tab, and under "Workflow(s) awaiting approval", click Approve and run.

Approve and run workflows

Skip to main content
GitHub Docs
Managing code review settings for your team
In this article
About code review settings
About team notifications
About auto assignment
Configuring team notifications
Configuring auto assignment
Disabling auto assignment
You can decrease noise for your team by limiting notifications when your team is requested to review a pull request.

Who can use this feature
Team maintainers and organization owners can configure code review settings.

Code review settings are available in all public repositories owned by an organization, and all private repositories owned by organizations on GitHub Team, GitHub Enterprise Server 2.20+, and GitHub Enterprise Cloud. For more information, see "GitHub's products."

About code review settings
To reduce noise for your team and clarify individual responsibility for pull request reviews, you can configure code review settings.

Team notifications
Auto assignment
About team notifications
When you choose to only notify requested team members, you disable sending notifications to the entire team when the team is requested to review a pull request if a specific member of that team is also requested for review. This is especially useful when a repository is configured with teams as code owners, but contributors to the repository often know a specific individual that would be the correct reviewer for their pull request. For more information, see "About code owners."

About auto assignment
When you enable auto assignment, any time your team has been requested to review a pull request, the team is removed as a reviewer and a specified subset of team members are assigned in the team's place. Code review assignments allow you to decide whether the whole team or just a subset of team members are notified when a team is requested for review.

When code owners are automatically requested for review, the team is still removed and replaced with individuals unless a branch protection rule is configured to require review from code owners. If such a branch protection rule is in place, the team request cannot be removed and so the individual request will appear in addition.

Routing algorithms
Code review assignments automatically choose and assign reviewers based on one of two possible algorithms.

The round robin algorithm chooses reviewers based on who's received the least recent review request, focusing on alternating between all members of the team regardless of the number of outstanding reviews they currently have.

The load balance algorithm chooses reviewers based on each member's total number of recent review requests and considers the number of outstanding reviews for each member. The load balance algorithm tries to ensure that each team member reviews an equal number of pull requests in any 30 day period.

Any team members that have set their status to "Busy" will not be selected for review. If all team members are busy, the pull request will remain assigned to the team itself. For more information about user statuses, see "Setting a status."

Configuring team notifications
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

In the left sidebar, click Code review.

Select Only notify requested team members.
Code review team notifications

Click Save changes.

Configuring auto assignment
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

In the left sidebar, click Code review.

Select Enable auto assignment.
Auto-assignment button

Under "How many team members should be assigned to review?", use the drop-down menu and choose a number of reviewers to be assigned to each pull request.
Number of reviewers dropdown

Under "Routing algorithm", use the drop-down menu and choose which algorithm you'd like to use. For more information, see "Routing algorithms."
Routing algorithm dropdown

Optionally, to always skip certain members of the team, select Never assign certain team members. Then, select one or more team members you'd like to always skip.
Never assign certain team members checkbox and dropdown

Optionally, to include members of child teams as potential reviewers when assigning requests, select Child team members.

Optionally, to count any members whose review has already been requested against the total number of members to assign, select Count existing requests.

Optionally, to remove the review request from the team when assigning team members, select Team review request.

Click Save changes.

Disabling auto assignment
In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
Your organizations in the profile menu

Click the name of your organization.
Organization name in list of organizations

Under your organization name, click Teams.

Teams tab

On the Teams tab, click the name of the team.
List of the organization's teams

At the top of the team page, click Settings.
Team settings tab

Select Enable auto assignment to remove the checkmark.
Code review assignment button

Click Save changes.

Did this doc help you?

Privacy policy
Help us make these docs great!
All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Or, learn how to contribute.

Still need help?
Ask the GitHub community
Contact support
© 2023 GitHub, Inc.
Terms
Privacy
Security
Status
Help
Contact GitHub
Pricing
Developer API
Training
Blog
About

components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/Monetization.java..usagw

Copy link
Author

@Camille0183 Camille0183 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/Monetization.java..usagw #11749 #11750

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.

2 participants